Module: Core::Initializable

Included in:
Service::Request, Service::Response
Defined in:
app/api/core/initializable.rb

Defined Under Namespace

Modules: InstanceMethods Classes: Initializer

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(base) ⇒ Object


22
23
24
25
26
27
# File 'app/api/core/initializable.rb', line 22

def self.extended(base)
  base.class_eval do
    include InstanceMethods
    const_set(:Initializer, Class.new(Core::Initializable::Initializer))
  end
end

Instance Method Details

#initialized_attr_reader(*names) ⇒ Object


29
30
31
32
# File 'app/api/core/initializable.rb', line 29

def initialized_attr_reader(*names)
  attr_reader(*names)
  self::Initializer.delegated_attribute_writer(*names)
end

#initialized_delegate(*names) ⇒ Object


34
35
36
# File 'app/api/core/initializable.rb', line 34

def initialized_delegate(*names)
  self::Initializer.delegate_to_owner(*names)
end