Class: RedirectHelper::Redirect

Inherits:
Object
  • Object
show all
Includes:
MethodRedirect
Defined in:
lib/evalhook/redirect_helper.rb

Overview

Internal class used for return method redirection messages Example: … class X

def foo
end

end def handle_method

return RedirectHelper::Redirect.new(X, X.new, :foo)

end

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(klass, recv, m, unhook = nil) ⇒ Redirect

Returns a new instance of Redirect.



47
48
49
50
51
# File 'lib/evalhook/redirect_helper.rb', line 47

def initialize(klass, recv, m, unhook = nil)
  @klass = klass
  @recv = recv
  @method = m
end

Instance Attribute Details

#klassObject (readonly)

Returns the value of attribute klass.



40
41
42
# File 'lib/evalhook/redirect_helper.rb', line 40

def klass
  @klass
end

#recvObject (readonly)

Returns the value of attribute recv.



41
42
43
# File 'lib/evalhook/redirect_helper.rb', line 41

def recv
  @recv
end

Instance Method Details

#method_nameObject



43
44
45
# File 'lib/evalhook/redirect_helper.rb', line 43

def method_name
  @method
end