Class: Cuboid::Support::Filter::Set
- Defined in:
- lib/cuboid/support/filter/set.rb
Overview
Filter based on a Set.
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Set
constructor
A new instance of Set.
- #to_rpc_data ⇒ Object
Methods inherited from Base
#<<, #==, #_dump, _load, #any?, #clear, #dup, #empty?, #hash, #include?, #merge, #size
Constructor Details
#initialize ⇒ Set
Returns a new instance of Set.
12 13 14 15 |
# File 'lib/cuboid/support/filter/set.rb', line 12 def initialize(*) super @collection = ::Set.new end |
Class Method Details
.from_rpc_data(data) ⇒ Object
21 22 23 24 |
# File 'lib/cuboid/support/filter/set.rb', line 21 def self.from_rpc_data( data ) , items = data new( ).merge items end |
Instance Method Details
#to_rpc_data ⇒ Object
17 18 19 |
# File 'lib/cuboid/support/filter/set.rb', line 17 def to_rpc_data [@options, @collection.to_a] end |