Class: IRWebmachine::Frame

Inherits:
Object
  • Object
show all
Defined in:
lib/irwebmachine/frame.rb

Instance Method Summary collapse

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

#contextObject



15
16
17
# File 'lib/irwebmachine/frame.rb', line 15

def context
  @binding
end

#ruby_call?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/irwebmachine/frame.rb', line 11

def ruby_call?
  "call" == @event
end

#to_sObject



19
20
21
# File 'lib/irwebmachine/frame.rb', line 19

def to_s
  "#{@klass}##{@method}"
end