Class: MongoMapper::Plugins::SpaceKeys::SpaceKeysContainer

Inherits:
Object
  • Object
show all
Includes:
EmbeddedDocument
Defined in:
lib/rad/mongo_mapper/space_keys.rb

Constant Summary collapse

SKIP_KEYS =
%w{_id space_id}

Instance Method Summary collapse

Instance Method Details

#blank?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/rad/mongo_mapper/space_keys.rb', line 11

def blank?
  self.class.keys.keys.select{|k| !SKIP_KEYS.include?(k.to_s)}.all?{|k| value = send(k); value.blank? or value == 0}          
end