Class: Debase::Breakpoint

Inherits:
Object show all
Defined in:
lib/debase/rbx/breakpoint.rb,
ext/breakpoint.c

Constant Summary collapse

@@global_id =
1

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source, pos, expr) ⇒ Breakpoint

Returns a new instance of Breakpoint.



59
60
61
62
63
64
65
# File 'ext/breakpoint.c', line 59

def initialize(file, line, expr=nil)
  @source = file
  @pos = line
  @expr = expr
  @id = @@global_id
  @@global_id = @@global_id + 1
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



99
100
101
# File 'ext/breakpoint.c', line 99

def id
  @id
end

#posObject

Returns the value of attribute pos.



117
118
119
# File 'ext/breakpoint.c', line 117

def pos
  @pos
end

#sourceObject

Returns the value of attribute source.



108
109
110
# File 'ext/breakpoint.c', line 108

def source
  @source
end

Class Method Details

.find(breakpoints, source, pos) ⇒ Object



194
195
196
197
198
# File 'ext/breakpoint.c', line 194

static VALUE
Breakpoint_find(VALUE self, VALUE breakpoints, VALUE source, VALUE pos)
{
  return breakpoint_find(breakpoints, source, pos);
}

.remove(breakpoints, id_value) ⇒ Object



74
75
76
77
78
# File 'ext/breakpoint.c', line 74

def self.remove(breakpoints, id)
  bp = breakpoints.delete_if {|b| b.id == id}
  bp.delete! if bp
  bp
end

Instance Method Details

#delete!Object



16
17
18
# File 'lib/debase/rbx/breakpoint.rb', line 16

def delete!

end