Module: Effective::Resources::Model

Included in:
Effective::Resource
Defined in:
app/models/effective/resources/model.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#modelObject

As defined by effective_resource do block in a model file



6
7
8
# File 'app/models/effective/resources/model.rb', line 6

def model
  @model
end

Instance Method Details

#_initialize_model(&block) ⇒ Object



8
9
10
11
12
13
14
# File 'app/models/effective/resources/model.rb', line 8

def _initialize_model(&block)
  @model = (model || ModelReader.new)
  @model.read(&block)

  # If effective_developer is in live mode, this will cause it to refresh the class
  # ActiveSupport.run_load_hooks(:effective_resource, self)
end