Method: MongoMapper::Plugins::Keys::Key#initialize
- Defined in:
- lib/mongo_mapper/plugins/keys.rb
#initialize(*args) ⇒ Key
Returns a new instance of Key.
299 300 301 302 303 304 |
# File 'lib/mongo_mapper/plugins/keys.rb', line 299 def initialize(*args) = args. @name, @type = args.shift.to_s, args.shift self. = ( || {}).symbolize_keys self.default_value = self..delete(:default) end |