Class: Handle
- Inherits:
-
Object
- Object
- Handle
- Defined in:
- lib/handle.rb
Instance Attribute Summary collapse
-
#contents ⇒ Object
Returns the value of attribute contents.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(contents) ⇒ Handle
constructor
A new instance of Handle.
Constructor Details
#initialize(contents) ⇒ Handle
Returns a new instance of Handle.
5 6 7 |
# File 'lib/handle.rb', line 5 def initialize(contents) @contents = contents end |
Instance Attribute Details
#contents ⇒ Object
Returns the value of attribute contents.
3 4 5 |
# File 'lib/handle.rb', line 3 def contents @contents end |
Instance Method Details
#==(other) ⇒ Object
9 10 11 12 |
# File 'lib/handle.rb', line 9 def ==(other) return nil unless other.class == self.class return other.contents == self.contents end |