Class: PropertyList::OrdSet
- Inherits:
-
Object
- Object
- PropertyList::OrdSet
- Defined in:
- lib/property-list.rb
Overview
call-seq:
PropertyList::OrdSet.new ['foo', 'bar', 3, 4]
Instance Attribute Summary collapse
-
#elements ⇒ Object
readonly
Returns the value of attribute elements.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(elements) ⇒ OrdSet
constructor
A new instance of OrdSet.
Constructor Details
#initialize(elements) ⇒ OrdSet
Returns a new instance of OrdSet.
102 103 104 |
# File 'lib/property-list.rb', line 102 def initialize elements @elements = elements.uniq end |
Instance Attribute Details
#elements ⇒ Object (readonly)
Returns the value of attribute elements.
106 107 108 |
# File 'lib/property-list.rb', line 106 def elements @elements end |
Instance Method Details
#==(other) ⇒ Object
108 109 110 |
# File 'lib/property-list.rb', line 108 def == other other.is_a?(OrdSet) and @elements == other.elements end |