Sha256: 22792ce5c59c3635a8b8d8b7f9e22a5bfbcdba2801acddf505fb5b22d5dca0a2
Contents?: true
Size: 472 Bytes
Versions: 8
Compression:
Stored size: 472 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
8 entries across 8 versions & 1 rubygems