Class: Quarry::Markup::Before
- Defined in:
- lib/quarry/markup/before.rb
Instance Attribute Summary
Attributes inherited from Macro
Instance Method Summary collapse
-
#run(runner, spec, context, output) ⇒ Object
Run before macro.
- #to_script ⇒ Object
Methods inherited from Macro
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_script ⇒ Object
19 20 21 |
# File 'lib/quarry/markup/before.rb', line 19 def to_script code.gsub(/^/, '# ') end |