Sha256: ab5fb71040e1242d389b63672c820d881efed89f3bb0edb140e7407012ed1c97
Contents?: true
Size: 755 Bytes
Versions: 36
Compression:
Stored size: 755 Bytes
Contents
module RR module DoubleDefinitions class DoubleDefinitionCreateBlankSlate def initialize(double_definition_create, &block) #:nodoc: @double_definition_create = double_definition_create BlankSlate.call(respond_to?(:class) ? self.class : __blank_slated_class) if block_given? if block.arity == 1 yield(self) else respond_to?(:instance_eval) ? instance_eval(&block) : __blank_slated_instance_eval(&block) end end end def method_missing(method_name, *args, &block) @double_definition_create.call(method_name, *args, &block) end def __double_definition_create__ @double_definition_create end end end end
Version data entries
36 entries across 32 versions & 5 rubygems