Class: Unity::Property
- Inherits:
-
Object
- Object
- Unity::Property
- Includes:
- ActiveModel::Validations, Conversion, Dimension::Vector
- Defined in:
- lib/unity/lookup/property.rb
Instance Attribute Summary collapse
-
#denominator ⇒ Object
Returns the value of attribute denominator.
-
#name ⇒ Object
Returns the value of attribute name.
-
#numerator ⇒ Object
Returns the value of attribute numerator.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Property
constructor
A new instance of Property.
Methods included from Conversion
Methods included from Fraction
#expanded_denominator, #expanded_numerator, #expression, #expression=, #inverse, #reduce, #unit
Methods included from Comparison
#==, #compatible!, #compatible?
Methods included from Dimension::Integer
#dimension_int, #property, #property_name
Methods included from Dimension::Vector
Constructor Details
#initialize(attributes = {}) ⇒ Property
Returns a new instance of Property.
13 14 15 16 17 18 |
# File 'lib/unity/lookup/property.rb', line 13 def initialize(attributes = {}) attributes.each do |name, value| send("#{name}=", value) end super end |
Instance Attribute Details
#denominator ⇒ Object
Returns the value of attribute denominator.
9 10 11 |
# File 'lib/unity/lookup/property.rb', line 9 def denominator @denominator end |
#name ⇒ Object
Returns the value of attribute name.
9 10 11 |
# File 'lib/unity/lookup/property.rb', line 9 def name @name end |
#numerator ⇒ Object
Returns the value of attribute numerator.
9 10 11 |
# File 'lib/unity/lookup/property.rb', line 9 def numerator @numerator end |
#value ⇒ Object
Returns the value of attribute value.
9 10 11 |
# File 'lib/unity/lookup/property.rb', line 9 def value @value end |