Class: Transit::Wrapper
- Inherits:
-
Object
- Object
- Transit::Wrapper
- Extended by:
- Forwardable
- Defined in:
- lib/transit/transit_types.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
-
#initialize(value) ⇒ Wrapper
constructor
A new instance of Wrapper.
- #inspect ⇒ Object
Constructor Details
#initialize(value) ⇒ Wrapper
Returns a new instance of Wrapper.
23 24 25 |
# File 'lib/transit/transit_types.rb', line 23 def initialize(value) @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
21 22 23 |
# File 'lib/transit/transit_types.rb', line 21 def value @value end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
27 28 29 |
# File 'lib/transit/transit_types.rb', line 27 def ==(other) other.is_a?(self.class) && @value == other.value end |
#inspect ⇒ Object
32 33 34 |
# File 'lib/transit/transit_types.rb', line 32 def inspect "<#{self.class} \"#{to_s}\">" end |