Class: RackConsole::MockMethod
- Inherits:
-
Object
- Object
- RackConsole::MockMethod
- Defined in:
- lib/rack_console/mock_method.rb
Instance Attribute Summary collapse
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#meth ⇒ Object
Returns the value of attribute meth.
-
#name ⇒ Object
Returns the value of attribute name.
-
#owner ⇒ Object
Returns the value of attribute owner.
Instance Method Summary collapse
-
#initialize(*args) ⇒ MockMethod
constructor
A new instance of MockMethod.
- #instance_method? ⇒ Boolean
- #source_location ⇒ Object
Constructor Details
#initialize(*args) ⇒ MockMethod
Returns a new instance of MockMethod.
4 5 6 7 |
# File 'lib/rack_console/mock_method.rb', line 4 def initialize *args @meth, @name, @kind, @owner = args @owner ||= @meth.owner end |
Instance Attribute Details
#kind ⇒ Object
Returns the value of attribute kind.
3 4 5 |
# File 'lib/rack_console/mock_method.rb', line 3 def kind @kind end |
#meth ⇒ Object
Returns the value of attribute meth.
3 4 5 |
# File 'lib/rack_console/mock_method.rb', line 3 def meth @meth end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/rack_console/mock_method.rb', line 3 def name @name end |
#owner ⇒ Object
Returns the value of attribute owner.
3 4 5 |
# File 'lib/rack_console/mock_method.rb', line 3 def owner @owner end |
Instance Method Details
#instance_method? ⇒ Boolean
8 9 10 |
# File 'lib/rack_console/mock_method.rb', line 8 def instance_method? @kind == :i end |
#source_location ⇒ Object
11 12 13 |
# File 'lib/rack_console/mock_method.rb', line 11 def source_location @meth.source_location end |