Class: Lab42::Behavior::Proxy

Inherits:
Object
  • Object
show all
Defined in:
lib/lab42/core/behavior/proxy.rb

Overview

Hey man really, that’s all??? All my responsibility is to intercept missing methods and sending them off to that Lab42::Behavior bloke, having him have all the fun!!!! You cannott be serious by any known defintion of that term, or, can you .….

Instance Attribute Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(*args, &blk) ⇒ Object (private)



17
18
19
20
21
# File 'lib/lab42/core/behavior/proxy.rb', line 17

def method_missing *args, &blk
  fm ?
    Lab42::Behavior::UnboundBehavior.new( receiver, receiver.instance_method( args.first ), *args.drop(1), &blk ) :
    Lab42::Behavior::BoundBehavior.new( receiver, receiver.method( args.first ), *args.drop(1), &blk )
end

Instance Attribute Details

#fmObject (readonly)

Returns the value of attribute fm.



10
11
12
# File 'lib/lab42/core/behavior/proxy.rb', line 10

def fm
  @fm
end

#receiverObject (readonly)

Returns the value of attribute receiver.



10
11
12
# File 'lib/lab42/core/behavior/proxy.rb', line 10

def receiver
  @receiver
end