Class: Ruty::Tags::Debug
- Inherits:
-
Ruty::Tag
- Object
- Datastructure::Node
- Ruty::Tag
- Ruty::Tags::Debug
- Defined in:
- lib/ruty/tags/debug.rb
Instance Method Summary collapse
-
#initialize(parser, argstring) ⇒ Debug
constructor
A new instance of Debug.
- #render_node(context, stream) ⇒ Object
Constructor Details
#initialize(parser, argstring) ⇒ Debug
Returns a new instance of Debug.
14 15 16 |
# File 'lib/ruty/tags/debug.rb', line 14 def initialize parser, argstring parser.fail('debug tag takes no arguments') if not argstring.empty? end |
Instance Method Details
#render_node(context, stream) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/ruty/tags/debug.rb', line 18 def render_node context, stream buffer = StringIO.new PP.pp(context, buffer) buffer.rewind stream << buffer.read.strip buffer.close end |