Class: Index
- Inherits:
-
Dynasnip
- Object
- Vanilla::Renderers::Base
- Dynasnip
- Index
- Defined in:
- lib/vanilla/dynasnips/index.rb
Instance Attribute Summary
Attributes inherited from Vanilla::Renderers::Base
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
4 5 6 7 8 9 10 |
# File 'lib/vanilla/dynasnips/index.rb', line 4 def get(*args) # TODO: figure out a way around calling Soup/AR methods directly. list = Soup.tuple_class.find_all_by_name('name').map { |tuple| "<li>#{Vanilla::Routes.link_to tuple.value}</li>" } "<ol>#{list}</ol>" end |