Module: MongoModel::AttributeMethods::Protected::ClassMethods

Defined in:
lib/mongomodel/concerns/attribute_methods/protected.rb

Instance Method Summary collapse

Instance Method Details

#property(name, *args, &block) ⇒ Object

:nodoc:



9
10
11
12
13
14
15
16
# File 'lib/mongomodel/concerns/attribute_methods/protected.rb', line 9

def property(name, *args, &block)#:nodoc:
  property = super(name, *args, &block)

  attr_protected(name) if property.options[:protected]
  attr_accessible(name) if property.options[:accessible]

  property
end