Module: Shape::Base

Extended by:
ActiveSupport::Concern
Includes:
ClassMethods
Included in:
Shape
Defined in:
lib/shape/base.rb

Defined Under Namespace

Modules: ClassMethods

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ClassMethods

#_properties_from, #associations, #delegate, #properties, #properties_from, #property, #shape, #shape_collection

Instance Attribute Details

#_parent=(value) ⇒ Object

Sets the attribute _parent

Parameters:

  • value

    the value to set the attribute _parent to.



9
10
11
# File 'lib/shape/base.rb', line 9

def _parent=(value)
  @_parent = value
end

#_sourceObject

Returns the value of attribute _source.



8
9
10
# File 'lib/shape/base.rb', line 8

def _source
  @_source
end

Instance Method Details

#initialize(source = nil, options = {}) ⇒ Object



13
14
15
16
17
# File 'lib/shape/base.rb', line 13

def initialize(source = nil, options = {})
  self._source = source
  self._parent = options.delete(:parent)
  self.delegate_properties_from
end