Class: UOM::CompositeDimension
- Defined in:
- lib/uom/dimension.rb
Overview
A CompositeDimension combines dimensions with an operator.
Instance Attribute Summary collapse
-
#dimensions ⇒ Object
readonly
Returns the value of attribute dimensions.
-
#operator ⇒ Object
readonly
Returns the value of attribute operator.
Attributes inherited from Dimension
Instance Method Summary collapse
-
#initialize(dimensions, operator) ⇒ CompositeDimension
constructor
Creates a CompositeDimension from the given dimensions and operator symbol.
Methods inherited from Dimension
Constructor Details
#initialize(dimensions, operator) ⇒ CompositeDimension
Creates a CompositeDimension from the given dimensions and operator symbol
25 26 27 28 29 30 31 |
# File 'lib/uom/dimension.rb', line 25 def initialize(dimensions, operator) @dimensions = dimensions @operator = operator super(create_label) # add to the extent CompositeDimension << self end |
Instance Attribute Details
#dimensions ⇒ Object (readonly)
Returns the value of attribute dimensions.
22 23 24 |
# File 'lib/uom/dimension.rb', line 22 def dimensions @dimensions end |
#operator ⇒ Object (readonly)
Returns the value of attribute operator.
22 23 24 |
# File 'lib/uom/dimension.rb', line 22 def operator @operator end |