Module: Datamappify::Lazy

Defined in:
lib/datamappify/lazy.rb,
lib/datamappify/lazy/attributes_handler.rb,
lib/datamappify/lazy/source_attributes_walker.rb

Defined Under Namespace

Classes: AttributesHandler, SourceAttributesWalker

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'lib/datamappify/lazy.rb', line 7

def self.included(klass)
  klass.class_eval do
    # @return [Repository]
    cattr_accessor :repository

    # @return [Hash]
    attr_accessor :cached_attributes
  end
end

Instance Method Details

#initialize(*args) ⇒ Object



17
18
19
20
21
22
# File 'lib/datamappify/lazy.rb', line 17

def initialize(*args)
  super

  @cached_attributes  = {}
  @attributes_handler = AttributesHandler.new(self)
end