Module: Casting::MissingMethodClientClass

Defined in:
lib/casting/missing_method_client_class.rb

Defined Under Namespace

Modules: InstanceMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(base) ⇒ Object



4
5
6
# File 'lib/casting/missing_method_client_class.rb', line 4

def self.extended(base)
  base.send(:include, InstanceMethods)
end

Instance Method Details

#__delegates__Object



48
49
50
51
# File 'lib/casting/missing_method_client_class.rb', line 48

def __delegates__
  Thread.current[:class_delegates] ||= {}
  Thread.current[:class_delegates][self.name] ||= []
end

#cast_as(attendant) ⇒ Object



38
39
40
41
# File 'lib/casting/missing_method_client_class.rb', line 38

def cast_as(attendant)
  __delegates__.unshift(attendant)
  self
end

#uncastObject



43
44
45
46
# File 'lib/casting/missing_method_client_class.rb', line 43

def uncast
  __delegates__.shift
  self
end