Class: GrapeSlate::Document
- Inherits:
-
GrapeMarkdown::Document
- Object
- GrapeMarkdown::Document
- GrapeSlate::Document
- Defined in:
- lib/grape-slate/document.rb
Instance Attribute Summary collapse
-
#shell_template ⇒ Object
readonly
Returns the value of attribute shell_template.
Instance Method Summary collapse
-
#initialize(api_class) ⇒ Document
constructor
A new instance of Document.
- #shell_example(route, resource) ⇒ Object
Constructor Details
#initialize(api_class) ⇒ Document
5 6 7 8 9 |
# File 'lib/grape-slate/document.rb', line 5 def initialize(api_class) super @shell_template = template_for(:shell) end |
Instance Attribute Details
#shell_template ⇒ Object (readonly)
Returns the value of attribute shell_template.
3 4 5 |
# File 'lib/grape-slate/document.rb', line 3 def shell_template @shell_template end |
Instance Method Details
#shell_example(route, resource) ⇒ Object
11 12 13 14 15 |
# File 'lib/grape-slate/document.rb', line 11 def shell_example(route, resource) example = ExampleGenerator::Shell.new(route, resource) render(shell_template, example.example_binding) end |