Class: Ohm::Model::Index

Inherits:
Set show all
Defined in:
lib/ohm.rb

Constant Summary

Constants inherited from Set

Raw

Instance Method Summary (collapse)

Methods inherited from Set

#except, #find, #inspect

Methods inherited from Collection

#<<, #[], #all, #clear, #concat, #delete, #each, #empty?, #first, #include?, #initialize, #key, #replace, #size, #sort, #sort_by

Constructor Details

This class inherits a constructor from Ohm::Model::Collection

Instance Method Details

- (Object) apply(operation, hash, glue)



273
274
275
276
277
278
279
# File 'lib/ohm.rb', line 273

def apply(operation, hash, glue)
  if hash.keys.size == 1
    return Set.new(keys(hash).first, Wrapper.wrap(model))
  else
    super
  end
end