Module: SimpleMapper::Properties::ClassMethods
- Defined in:
- lib/simple_mapper/default_plugins/properties.rb
Instance Method Summary collapse
- #identifier(id = nil) ⇒ Object
- #properties(*property_names) ⇒ Object
- #property(property_name) ⇒ Object
Instance Method Details
#identifier(id = nil) ⇒ Object
32 33 34 35 |
# File 'lib/simple_mapper/default_plugins/properties.rb', line 32 def identifier(id=nil) @identifier = id.to_s unless id.nil? @identifier end |
#properties(*property_names) ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/simple_mapper/default_plugins/properties.rb', line 20 def properties(*property_names) if property_names.length > 0 property_names.each {|e| property e.to_s} else @properties ||= [] end end |
#property(property_name) ⇒ Object
28 29 30 |
# File 'lib/simple_mapper/default_plugins/properties.rb', line 28 def property(property_name) properties << property_name.to_sym end |