Class: Useless::Doc::UI::Godel::API
- Inherits:
-
Mustache
- Object
- Mustache
- Useless::Doc::UI::Godel::API
- Extended by:
- Forwardable
- Defined in:
- lib/useless/doc/ui/godel.rb
Instance Method Summary collapse
- #concept ⇒ Object
- #description ⇒ Object
- #doc_url ⇒ Object
- #implementation ⇒ Object
-
#initialize(api, router) ⇒ API
constructor
A new instance of API.
- #resources ⇒ Object
- #specification ⇒ Object
Constructor Details
#initialize(api, router) ⇒ API
Returns a new instance of API.
76 77 78 79 |
# File 'lib/useless/doc/ui/godel.rb', line 76 def initialize(api, router) @api = api @router = router end |
Instance Method Details
#concept ⇒ Object
93 94 95 96 97 |
# File 'lib/useless/doc/ui/godel.rb', line 93 def concept if @api.concept Godel::Stage.new(@api.concept) end end |
#description ⇒ Object
85 86 87 |
# File 'lib/useless/doc/ui/godel.rb', line 85 def description Godel.markdown.render(@api.description) end |
#doc_url ⇒ Object
81 82 83 |
# File 'lib/useless/doc/ui/godel.rb', line 81 def doc_url @router.doc_for_api(@api.url) end |
#implementation ⇒ Object
105 106 107 108 109 |
# File 'lib/useless/doc/ui/godel.rb', line 105 def implementation if @api.implementation Godel::Stage.new(@api.implementation) end end |