Class: AssignableValues::HumanizedValue
- Inherits:
-
Object
- Object
- AssignableValues::HumanizedValue
- Defined in:
- lib/assignable_values/humanized_value.rb
Instance Attribute Summary collapse
-
#humanized ⇒ Object
readonly
Returns the value of attribute humanized.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value, humanized) ⇒ HumanizedValue
constructor
A new instance of HumanizedValue.
- #inspect ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(value, humanized) ⇒ HumanizedValue
Returns a new instance of HumanizedValue.
6 7 8 9 |
# File 'lib/assignable_values/humanized_value.rb', line 6 def initialize(value, humanized) @value = value @humanized = humanized end |
Instance Attribute Details
#humanized ⇒ Object (readonly)
Returns the value of attribute humanized.
4 5 6 |
# File 'lib/assignable_values/humanized_value.rb', line 4 def humanized @humanized end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
4 5 6 |
# File 'lib/assignable_values/humanized_value.rb', line 4 def value @value end |
Instance Method Details
#inspect ⇒ Object
15 16 17 |
# File 'lib/assignable_values/humanized_value.rb', line 15 def inspect "#<#{self.class.name} value: #{value.inspect}, humanized: #{humanized.inspect}>" end |
#to_s ⇒ Object
11 12 13 |
# File 'lib/assignable_values/humanized_value.rb', line 11 def to_s humanized end |