Class: TEALrb::Rewriters::MethodRewriter

Inherits:
Rewriter
  • Object
show all
Defined in:
lib/tealrb/rewriters.rb

Instance Attribute Summary

Attributes inherited from Rewriter

#contract

Instance Method Summary collapse

Methods inherited from Rewriter

#rewrite

Instance Method Details

#on_block(node) ⇒ Object



38
39
40
# File 'lib/tealrb/rewriters.rb', line 38

def on_block(node)
  replace node.source_range, node.body.source
end

#on_def(node) ⇒ Object



33
34
35
36
# File 'lib/tealrb/rewriters.rb', line 33

def on_def(node)
  replace node.source_range, node.body.source
  super
end