Class: ActiveRecord::Properties::Base
- Inherits:
-
Struct
- Object
- Struct
- ActiveRecord::Properties::Base
- Defined in:
- lib/active_record/properties/base.rb
Direct Known Subclasses
BooleanProperty, CounterProperty, NumberProperty, StringProperty
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Class Method Summary collapse
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name
3 4 5 |
# File 'lib/active_record/properties/base.rb', line 3 def name @name end |
Class Method Details
.add_property_accessor(*suffixes, &block) ⇒ Object
11 12 13 14 |
# File 'lib/active_record/properties/base.rb', line 11 def add_property_accessor(*suffixes, &block) self._property_accessors ||= {} self._property_accessors = _property_accessors.merge(suffixes.to_a => block) end |
.property_accessors ⇒ Object
7 8 9 |
# File 'lib/active_record/properties/base.rb', line 7 def property_accessors self._property_accessors || {} end |