Class: Quarry::Markup::Before

Inherits:
Macro show all
Defined in:
lib/quarry/markup/before.rb

Instance Attribute Summary

Attributes inherited from Macro

#code, #lineno, #spec

Instance Method Summary collapse

Methods inherited from Macro

#initialize, #tab, #to_s

Constructor Details

This class inherits a constructor from Quarry::Markup::Macro

Instance Method Details

#run(runner, spec, context, output) ⇒ Object

Run before macro.



13
14
15
16
# File 'lib/quarry/markup/before.rb', line 13

def run(runner, spec, context, output)
  #runner.before = code
  output.report_macro(self)
end

#to_scriptObject



19
20
21
# File 'lib/quarry/markup/before.rb', line 19

def to_script
  code.gsub(/^/, '# ')
end