Class: MiniArray
- Extended by:
- Forwardable
- Defined in:
- lib/multimap/spec/spec_helper.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
- #==(other) ⇒ Object
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(data = []) ⇒ MiniArray
constructor
A new instance of MiniArray.
- #initialize_copy(orig) ⇒ Object
Constructor Details
#initialize(data = []) ⇒ MiniArray
Returns a new instance of MiniArray.
40 41 42 |
# File 'lib/multimap/spec/spec_helper.rb', line 40 def initialize(data = []) @data = data end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
38 39 40 |
# File 'lib/multimap/spec/spec_helper.rb', line 38 def data @data end |
Instance Method Details
#<=>(other) ⇒ Object
63 64 65 |
# File 'lib/multimap/spec/spec_helper.rb', line 63 def <=>(other) @data <=> other.data end |
#==(other) ⇒ Object
50 51 52 |
# File 'lib/multimap/spec/spec_helper.rb', line 50 def ==(other) other.is_a?(self.class) && @data == other.data end |
#eql?(other) ⇒ Boolean
54 55 56 |
# File 'lib/multimap/spec/spec_helper.rb', line 54 def eql?(other) other.is_a?(self.class) && @data.eql?(other.data) end |
#hash ⇒ Object
59 60 61 |
# File 'lib/multimap/spec/spec_helper.rb', line 59 def hash @data.hash end |
#initialize_copy(orig) ⇒ Object
44 45 46 |
# File 'lib/multimap/spec/spec_helper.rb', line 44 def initialize_copy(orig) @data = orig.data.dup end |