Class: YARP::Debug::ISeq
- Inherits:
-
Object
- Object
- YARP::Debug::ISeq
- Defined in:
- lib/yarp.rb
Instance Attribute Summary collapse
-
#parts ⇒ Object
readonly
Returns the value of attribute parts.
Instance Method Summary collapse
- #each_child ⇒ Object
-
#initialize(parts) ⇒ ISeq
constructor
A new instance of ISeq.
- #instructions ⇒ Object
- #local_table ⇒ Object
- #type ⇒ Object
Constructor Details
#initialize(parts) ⇒ ISeq
Returns a new instance of ISeq.
427 428 429 |
# File 'lib/yarp.rb', line 427 def initialize(parts) @parts = parts end |
Instance Attribute Details
#parts ⇒ Object (readonly)
Returns the value of attribute parts.
425 426 427 |
# File 'lib/yarp.rb', line 425 def parts @parts end |
Instance Method Details
#each_child ⇒ Object
443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 |
# File 'lib/yarp.rb', line 443 def each_child instructions.each do |instruction| # Only look at arrays. Other instructions are line numbers or # tracepoint events. next unless instruction.is_a?(Array) instruction.each do |opnd| # Only look at arrays. Other operands are literals. next unless opnd.is_a?(Array) # Only look at instruction sequences. Other operands are literals. next unless opnd[0] == "YARVInstructionSequence/SimpleDataFormat" yield ISeq.new(opnd) end end end |
#instructions ⇒ Object
439 440 441 |
# File 'lib/yarp.rb', line 439 def instructions parts[13] end |
#local_table ⇒ Object
435 436 437 |
# File 'lib/yarp.rb', line 435 def local_table parts[10] end |
#type ⇒ Object
431 432 433 |
# File 'lib/yarp.rb', line 431 def type parts[0] end |