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.
-
#previous_line ⇒ Object
Returns the value of attribute previous_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.
232 233 234 235 236 |
# File 'lib/byebug/processors/command_processor.rb', line 232 def initialize(commands, context, display, file, interface, line) @commands, @context, @display = commands, context, display @file, @interface, @line = file, interface, line @frame_pos, @previous_line, @proceed = 0, nil, false end |
Instance Attribute Details
#commands ⇒ Object
Returns the value of attribute commands.
229 230 231 |
# File 'lib/byebug/processors/command_processor.rb', line 229 def commands @commands end |
#context ⇒ Object
Returns the value of attribute context.
229 230 231 |
# File 'lib/byebug/processors/command_processor.rb', line 229 def context @context end |
#display ⇒ Object
Returns the value of attribute display.
229 230 231 |
# File 'lib/byebug/processors/command_processor.rb', line 229 def display @display end |
#file ⇒ Object
Returns the value of attribute file.
229 230 231 |
# File 'lib/byebug/processors/command_processor.rb', line 229 def file @file end |
#frame_pos ⇒ Object
Returns the value of attribute frame_pos.
229 230 231 |
# File 'lib/byebug/processors/command_processor.rb', line 229 def frame_pos @frame_pos end |
#interface ⇒ Object
Returns the value of attribute interface.
230 231 232 |
# File 'lib/byebug/processors/command_processor.rb', line 230 def interface @interface end |
#line ⇒ Object
Returns the value of attribute line.
230 231 232 |
# File 'lib/byebug/processors/command_processor.rb', line 230 def line @line end |
#previous_line ⇒ Object
Returns the value of attribute previous_line.
230 231 232 |
# File 'lib/byebug/processors/command_processor.rb', line 230 def previous_line @previous_line end |
Instance Method Details
#location ⇒ Object
249 250 251 252 253 254 255 |
# File 'lib/byebug/processors/command_processor.rb', line 249 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
245 246 247 |
# File 'lib/byebug/processors/command_processor.rb', line 245 def proceed @proceed = true end |
#proceed? ⇒ Boolean
241 242 243 |
# File 'lib/byebug/processors/command_processor.rb', line 241 def proceed? @proceed end |