Class: RubyBreaker::ObjectPosition
- Inherits:
-
Object
- Object
- RubyBreaker::ObjectPosition
- Defined in:
- lib/rubybreaker/debug/context.rb
Overview
This class represents a position with respect to an object and the name of a method being invoked.
Instance Attribute Summary collapse
-
#meth_name ⇒ Object
Returns the value of attribute meth_name.
-
#obj ⇒ Object
Returns the value of attribute obj.
Instance Method Summary collapse
-
#initialize(obj, meth_name) ⇒ ObjectPosition
constructor
A new instance of ObjectPosition.
- #to_s ⇒ Object
Constructor Details
#initialize(obj, meth_name) ⇒ ObjectPosition
Returns a new instance of ObjectPosition.
61 62 63 64 |
# File 'lib/rubybreaker/debug/context.rb', line 61 def initialize(obj, meth_name) @obj = obj @meth_name = meth_name end |
Instance Attribute Details
#meth_name ⇒ Object
Returns the value of attribute meth_name.
59 60 61 |
# File 'lib/rubybreaker/debug/context.rb', line 59 def meth_name @meth_name end |
#obj ⇒ Object
Returns the value of attribute obj.
58 59 60 |
# File 'lib/rubybreaker/debug/context.rb', line 58 def obj @obj end |
Instance Method Details
#to_s ⇒ Object
66 67 68 69 |
# File 'lib/rubybreaker/debug/context.rb', line 66 def to_s() m_delim = @obj.kind_of?(Module) ? "." : "#" return "> #{@obj.class}#{m_delim}#{@meth_name}" end |