Class: Unity::Property

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Validations, Conversion, Dimension::Vector
Defined in:
lib/unity/lookup/property.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Conversion

#convert_to

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

#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

#denominatorObject

Returns the value of attribute denominator.



9
10
11
# File 'lib/unity/lookup/property.rb', line 9

def denominator
  @denominator
end

#nameObject

Returns the value of attribute name.



9
10
11
# File 'lib/unity/lookup/property.rb', line 9

def name
  @name
end

#numeratorObject

Returns the value of attribute numerator.



9
10
11
# File 'lib/unity/lookup/property.rb', line 9

def numerator
  @numerator
end

#valueObject

Returns the value of attribute value.



9
10
11
# File 'lib/unity/lookup/property.rb', line 9

def value
  @value
end