class Hamster::Set
Definitions
¶ ↑
Public Instance Methods
as_json(options = nil)
click to toggle source
# File lib/nrser/gem_ext/hamster/set.rb, line 53 def as_json options = nil to_mutable_array.to_json options # { '$set' => to_h.as_json( options ) } end
to_h()
click to toggle source
# File lib/nrser/gem_ext/hamster/set.rb, line 48 def to_h each_with_object( {} ) { |member, hash| hash[member] = true } end
to_mutable()
click to toggle source
to_mutable_array()
click to toggle source
# File lib/nrser/gem_ext/hamster/set.rb, line 41 def to_mutable_array each_with_object( [] ) { |member, array| array << Hamster.to_mutable( member ) } end
to_yaml(*args, &block)
click to toggle source
# File lib/nrser/gem_ext/hamster/set.rb, line 59 def to_yaml *args, &block to_mutable.to_yaml *args, &block end