Module: MongoMapper::ReadonlyAttributes::ClassMethods

Defined in:
lib/mongo_mapper/readonly_attributes.rb

Instance Method Summary collapse

Instance Method Details

#attr_readonly(*attributes) ⇒ Object



20
21
22
# File 'lib/mongo_mapper/readonly_attributes.rb', line 20

def attr_readonly(*attributes)
  self._attr_readonly = Set.new(attributes.map { |a| a.to_s }) + (self._attr_readonly || [])
end

#readonly_attributesObject



24
25
26
# File 'lib/mongo_mapper/readonly_attributes.rb', line 24

def readonly_attributes
    self._attr_readonly
end