Class: Forwarder::Params

Inherits:
Object
  • Object
show all
Defined in:
lib/forwarder/params.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#argumentsObject (readonly)

Returns the value of attribute arguments.



7
8
9
# File 'lib/forwarder/params.rb', line 7

def arguments
  @arguments
end

#forwardeeObject (readonly)

Returns the value of attribute forwardee.



7
8
9
# File 'lib/forwarder/params.rb', line 7

def forwardee
  @forwardee
end

Instance Method Details

#forward!Object



8
9
10
11
12
13
14
15
# File 'lib/forwarder/params.rb', line 8

def forward!
  compiled = compile_forward
  if compiled
    forwardee.module_eval compiled, __FILE__, __LINE__
  else
    general_delegate
  end
end

#prepare_forward(*args, &blk) ⇒ Object



17
18
19
# File 'lib/forwarder/params.rb', line 17

def prepare_forward *args, &blk
  @arguments = Arguments.new( *args, &blk ) 
end