Class: IRWebmachine::Frame
- Inherits:
-
Object
- Object
- IRWebmachine::Frame
- Defined in:
- lib/irwebmachine/frame.rb
Instance Method Summary collapse
- #context ⇒ Object
-
#initialize(binding, event) ⇒ Frame
constructor
A new instance of Frame.
- #ruby_call? ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize(binding, event) ⇒ Frame
Returns a new instance of Frame.
2 3 4 5 6 7 8 9 |
# File 'lib/irwebmachine/frame.rb', line 2 def initialize(binding,event) @binding = binding @event = event @file = binding.eval "__FILE__" @lineno = binding.eval "__LINE__" @method = binding.eval "__method__" @klass = binding.eval("self").method(@method).owner end |
Instance Method Details
#context ⇒ Object
15 16 17 |
# File 'lib/irwebmachine/frame.rb', line 15 def context @binding end |
#ruby_call? ⇒ Boolean
11 12 13 |
# File 'lib/irwebmachine/frame.rb', line 11 def ruby_call? "call" == @event end |
#to_s ⇒ Object
19 20 21 |
# File 'lib/irwebmachine/frame.rb', line 19 def to_s "#{@klass}##{@method}" end |