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.
333 334 335 |
# File 'lib/yarp.rb', line 333 def initialize(parts) @parts = parts end |
Instance Attribute Details
#parts ⇒ Object (readonly)
Returns the value of attribute parts.
331 332 333 |
# File 'lib/yarp.rb', line 331 def parts @parts end |
Instance Method Details
#each_child ⇒ Object
349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 |
# File 'lib/yarp.rb', line 349 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
345 346 347 |
# File 'lib/yarp.rb', line 345 def instructions parts[13] end |
#local_table ⇒ Object
341 342 343 |
# File 'lib/yarp.rb', line 341 def local_table parts[10] end |
#type ⇒ Object
337 338 339 |
# File 'lib/yarp.rb', line 337 def type parts[0] end |