Class: Civil::Set
- Inherits:
-
Set
- Object
- Set
- Civil::Set
- Defined in:
- lib/civil/set.rb
Instance Method Summary collapse
- #<<(o) ⇒ Object
- #add(o) ⇒ Object
-
#initialize(enum = nil) ⇒ Set
constructor
A new instance of Set.
- #pluck(key) ⇒ Object
- #where(attrs) ⇒ Object
Constructor Details
Instance Method Details
#<<(o) ⇒ Object
15 16 17 |
# File 'lib/civil/set.rb', line 15 def <<(o) add(o) end |
#add(o) ⇒ Object
9 10 11 12 13 |
# File 'lib/civil/set.rb', line 9 def add(o) o and o.is_a?(::Hash) and o = Civil::Hash.new.merge(o) super end |