Class: ActiveRecord::Properties::Base

Inherits:
Struct
  • Object
show all
Defined in:
lib/active_record/properties/base.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of 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_accessorsObject



7
8
9
# File 'lib/active_record/properties/base.rb', line 7

def property_accessors
  self._property_accessors || {}
end