Class: Byebug::CommandProcessor::State
- Inherits:
-
Object
- Object
- Byebug::CommandProcessor::State
- Extended by:
- Forwardable
- Defined in:
- lib/byebug/processors/command_processor.rb
Instance Attribute Summary collapse
-
#commands ⇒ Object
Returns the value of attribute commands.
-
#context ⇒ Object
Returns the value of attribute context.
-
#display ⇒ Object
Returns the value of attribute display.
-
#file ⇒ Object
Returns the value of attribute file.
-
#frame_pos ⇒ Object
Returns the value of attribute frame_pos.
-
#interface ⇒ Object
Returns the value of attribute interface.
-
#line ⇒ Object
Returns the value of attribute line.
-
#prev_line ⇒ Object
Returns the value of attribute prev_line.
Instance Method Summary collapse
-
#initialize(commands, context, display, file, interface, line) ⇒ State
constructor
A new instance of State.
- #location ⇒ Object
- #proceed ⇒ Object
- #proceed? ⇒ Boolean
Constructor Details
#initialize(commands, context, display, file, interface, line) ⇒ State
Returns a new instance of State.
255 256 257 258 259 |
# File 'lib/byebug/processors/command_processor.rb', line 255 def initialize(commands, context, display, file, interface, line) @commands, @context, @display = commands, context, display @file, @frame_pos, @interface = file, 0, interface @line, @prev_line, @proceed = line, nil, false end |
Instance Attribute Details
#commands ⇒ Object
Returns the value of attribute commands.
252 253 254 |
# File 'lib/byebug/processors/command_processor.rb', line 252 def commands @commands end |
#context ⇒ Object
Returns the value of attribute context.
252 253 254 |
# File 'lib/byebug/processors/command_processor.rb', line 252 def context @context end |
#display ⇒ Object
Returns the value of attribute display.
252 253 254 |
# File 'lib/byebug/processors/command_processor.rb', line 252 def display @display end |
#file ⇒ Object
Returns the value of attribute file.
252 253 254 |
# File 'lib/byebug/processors/command_processor.rb', line 252 def file @file end |
#frame_pos ⇒ Object
Returns the value of attribute frame_pos.
252 253 254 |
# File 'lib/byebug/processors/command_processor.rb', line 252 def frame_pos @frame_pos end |
#interface ⇒ Object
Returns the value of attribute interface.
252 253 254 |
# File 'lib/byebug/processors/command_processor.rb', line 252 def interface @interface end |
#line ⇒ Object
Returns the value of attribute line.
252 253 254 |
# File 'lib/byebug/processors/command_processor.rb', line 252 def line @line end |
#prev_line ⇒ Object
Returns the value of attribute prev_line.
252 253 254 |
# File 'lib/byebug/processors/command_processor.rb', line 252 def prev_line @prev_line end |
Instance Method Details
#location ⇒ Object
272 273 274 275 276 277 278 |
# File 'lib/byebug/processors/command_processor.rb', line 272 def location path = self.class.canonic_file(@file) loc = "#{path} @ #{@line}\n" loc += "#{get_line(@file, @line)}\n" unless ['(irb)', '-e'].include? @file loc end |
#proceed ⇒ Object
268 269 270 |
# File 'lib/byebug/processors/command_processor.rb', line 268 def proceed @proceed = true end |
#proceed? ⇒ Boolean
264 265 266 |
# File 'lib/byebug/processors/command_processor.rb', line 264 def proceed? @proceed end |