Class: MetaCode

Inherits:
CodeObject show all
Defined in:
lib/ruby_diff/structure_processor.rb

Overview

Meta method support

Instance Attribute Summary

Attributes inherited from CodeObject

#children, #name, #parent, #sexp

Instance Method Summary collapse

Methods inherited from CodeObject

#==, #child_signatures, #to_s

Constructor Details

#initialize(name, parent, label, sexp = s()) ⇒ MetaCode

Returns a new instance of MetaCode.



61
62
63
64
# File 'lib/ruby_diff/structure_processor.rb', line 61

def initialize(name, parent, label, sexp=s() )
  super(name, parent, sexp)
  @label = label
end

Instance Method Details

#signatureObject



66
67
68
69
# File 'lib/ruby_diff/structure_processor.rb', line 66

def signature
  parent_signature = self.parent ? self.parent.signature : ""
  "#{parent_signature} {#{@label} #{self.name}}"
end