module Pricecut module Elements class Element attr_accessor :visitor, :node def initialize(visitor, node) @visitor = visitor @node = node end def append_newline append_output("\n") end alias_method :eol, :append_newline def append_output(text) visitor.append_output(text) end alias_method :p, :append_output def yield_children visitor.visit_children(node) end end end end