Module: MongoHashie::MetaData::ClassMethods

Defined in:
lib/mongo-hashie/meta_data.rb

Instance Method Summary collapse

Instance Method Details

#ignored_keysObject



43
44
45
# File 'lib/mongo-hashie/meta_data.rb', line 43

def ignored_keys
  ['_id', 'class_name']
end

#properties_usedObject



31
32
33
34
35
36
37
38
39
40
41
# File 'lib/mongo-hashie/meta_data.rb', line 31

def properties_used
   = MetaDataProperties.first(:class_name => name)
   = {}
  if 
    properties = .keys.select {|k| k unless ignored_keys.include?(k)}
    properties.each do |key|
      [key] = .send(key.to_sym)
    end
  end
  
end