Class: Grumlin::TypedValue
- Inherits:
-
Object
- Object
- Grumlin::TypedValue
- Defined in:
- lib/grumlin/typed_value.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(type: nil, value: nil) ⇒ TypedValue
constructor
A new instance of TypedValue.
- #inspect ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(type: nil, value: nil) ⇒ TypedValue
Returns a new instance of TypedValue.
6 7 8 9 |
# File 'lib/grumlin/typed_value.rb', line 6 def initialize(type: nil, value: nil) @type = type @value = value end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
4 5 6 |
# File 'lib/grumlin/typed_value.rb', line 4 def type @type end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
4 5 6 |
# File 'lib/grumlin/typed_value.rb', line 4 def value @value end |
Instance Method Details
#inspect ⇒ Object
11 12 13 |
# File 'lib/grumlin/typed_value.rb', line 11 def inspect "<#{type}.#{value}>" end |
#to_s ⇒ Object
15 16 17 |
# File 'lib/grumlin/typed_value.rb', line 15 def to_s inspect end |