Sha256: 685b9e22c641323475982e9ef30bdf6adce316aea8b6ddbafbbd56dcbf919b23
Contents?: true
Size: 615 Bytes
Versions: 141
Compression:
Stored size: 615 Bytes
Contents
# frozen_string_literal: true module Effective module Resources module Model attr_accessor :model # As defined by effective_resource do block in a model file 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 def model @model || (klass.effective_resource.model if klass.respond_to?(:effective_resource) && klass.effective_resource) end end end end
Version data entries
141 entries across 141 versions & 1 rubygems