Class: Handle

Inherits:
Object
  • Object
show all
Defined in:
lib/handle.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#contentsObject

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