Sha256: 15fd09d763974d377eb89098af719cd0f6ff6e868edb9a711244d486d172b5b7
Contents?: true
Size: 471 Bytes
Versions: 5
Compression:
Stored size: 471 Bytes
Contents
require 'rails_admin/config/model' module RailsAdmin module Config class LazyModel def initialize(entity, &block) @entity = entity @deferred_block = block end def method_missing(method, *args, &block) if !@model @model = RailsAdmin::Config::Model.new(@entity) @model.instance_eval(&@deferred_block) if @deferred_block end @model.send(method, *args, &block) end end end end
Version data entries
5 entries across 5 versions & 2 rubygems