Class: Tins::Unit::Prefix

Inherits:
Struct
  • Object
show all
Defined in:
lib/tins/unit.rb

Overview

A simple data structure representing a unit prefix with name, scaling step, multiplier, and fraction flag.

Instance Attribute Summary collapse

Instance Attribute Details

#fractionObject

Returns the value of attribute fraction

Returns:

  • (Object)

    the current value of fraction



15
16
17
# File 'lib/tins/unit.rb', line 15

def fraction
  @fraction
end

#multiplierObject

Returns the value of attribute multiplier

Returns:

  • (Object)

    the current value of multiplier



15
16
17
# File 'lib/tins/unit.rb', line 15

def multiplier
  @multiplier
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



15
16
17
# File 'lib/tins/unit.rb', line 15

def name
  @name
end

#stepObject

Returns the value of attribute step

Returns:

  • (Object)

    the current value of step



15
16
17
# File 'lib/tins/unit.rb', line 15

def step
  @step
end