Class: Debug

Inherits:
Dynasnip show all
Defined in:
lib/vanilla/dynasnips/debug.rb

Overview

If the dynasnip is a subclass of Dynasnip, it has access to the request hash (or whatever - access to some object outside of the snip itself.)

Instance Attribute Summary

Attributes inherited from Vanilla::Renderers::Base

#app

Instance Method Summary collapse

Methods inherited from Dynasnip

all, attribute, build_snip, #method_missing, persist!, persist_all!, snip_attributes, snip_name, usage

Methods inherited from Vanilla::Renderers::Base

escape_curly_braces, #include_snips, #initialize, #prepare, #process_text, #raw_content, render, #render, #render_without_including_snips, snip_regexp

Constructor Details

This class inherits a constructor from Vanilla::Renderers::Base

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Dynasnip

Instance Method Details

#get(*args) ⇒ Object



6
7
8
# File 'lib/vanilla/dynasnips/debug.rb', line 6

def get(*args)
  app.request.inspect
end

#post(*args) ⇒ Object



10
11
12
# File 'lib/vanilla/dynasnips/debug.rb', line 10

def post(*args)
  "You posted! " + app.request.inspect
end