Class: Unity::SimpleUnit
- Inherits:
-
Object
- Object
- Unity::SimpleUnit
- Includes:
- ActiveModel::Validations, Dimension::Integer
- Defined in:
- lib/unity/lookup/simple_unit.rb
Instance Attribute Summary collapse
-
#dimension ⇒ Object
Returns the value of attribute dimension.
-
#name ⇒ Object
(also: #to_s)
Returns the value of attribute name.
-
#si_factor ⇒ Object
Returns the value of attribute si_factor.
Instance Method Summary collapse
- #dimension_vector ⇒ Object
-
#initialize(attributes = {}) ⇒ SimpleUnit
constructor
A new instance of SimpleUnit.
Methods included from Dimension::Integer
#dimension_int, #property, #property_name
Constructor Details
#initialize(attributes = {}) ⇒ SimpleUnit
Returns a new instance of SimpleUnit.
19 20 21 22 23 |
# File 'lib/unity/lookup/simple_unit.rb', line 19 def initialize(attributes = {}) attributes.each do |name, value| send("#{name}=", value) end end |
Instance Attribute Details
#dimension ⇒ Object
Returns the value of attribute dimension.
8 9 10 |
# File 'lib/unity/lookup/simple_unit.rb', line 8 def dimension @dimension end |
#name ⇒ Object Also known as: to_s
Returns the value of attribute name.
8 9 10 |
# File 'lib/unity/lookup/simple_unit.rb', line 8 def name @name end |
#si_factor ⇒ Object
Returns the value of attribute si_factor.
8 9 10 |
# File 'lib/unity/lookup/simple_unit.rb', line 8 def si_factor @si_factor end |