Class: PropertyList::OrdSet

Inherits:
Object
  • Object
show all
Defined in:
lib/property-list.rb

Overview

call-seq:

PropertyList::OrdSet.new ['foo', 'bar', 3, 4]

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(elements) ⇒ OrdSet

Returns a new instance of OrdSet.



112
113
114
# File 'lib/property-list.rb', line 112

def initialize elements
  @elements = elements.uniq
end

Instance Attribute Details

#elementsObject (readonly)

Returns the value of attribute elements.



116
117
118
# File 'lib/property-list.rb', line 116

def elements
  @elements
end

Instance Method Details

#==(other) ⇒ Object



118
119
120
# File 'lib/property-list.rb', line 118

def == other
  other.is_a?(OrdSet) and @elements == other.elements
end