Class: Zxc::First

Inherits:
Step
  • Object
show all
Defined in:
lib/zxc/steps/first.rb

Constant Summary

Constants inherited from Step

Step::Kind

Instance Method Summary collapse

Methods inherited from Step

#depth_decreased, #depth_increased, #initialize

Constructor Details

This class inherits a constructor from Zxc::Step

Instance Method Details

#run(root) ⇒ Object



11
12
13
14
15
# File 'lib/zxc/steps/first.rb', line 11

def run(root)
  root.at_depth(-2).each do |node|
    node.subnodes = [node.subnodes.first]
  end
end