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
45 46 47 48 |
# File 'lib/casting/missing_method_client_class.rb', line 45 def __delegates__ Thread.current[:class_delegates] ||= {} Thread.current[:class_delegates][self.name] ||= [] end |
#cast_as(attendant) ⇒ Object
35 36 37 38 |
# File 'lib/casting/missing_method_client_class.rb', line 35 def cast_as(attendant) __delegates__.unshift(attendant) self end |
#uncast ⇒ Object
40 41 42 43 |
# File 'lib/casting/missing_method_client_class.rb', line 40 def uncast __delegates__.shift self end |