Class: RspecApiDocumentation::Views::HtmlExample
- Inherits:
-
MarkupExample
- Object
- Mustache
- MarkupExample
- RspecApiDocumentation::Views::HtmlExample
- Defined in:
- lib/rspec_api_documentation/views/html_example.rb
Constant Summary collapse
- EXTENSION =
'html'
Instance Method Summary collapse
- #extension ⇒ Object
-
#initialize(example, configuration) ⇒ HtmlExample
constructor
A new instance of HtmlExample.
- #styles ⇒ Object
Methods inherited from MarkupExample
#dirname, #filename, #method_missing, #parameters, #requests, #respond_to?
Constructor Details
#initialize(example, configuration) ⇒ HtmlExample
Returns a new instance of HtmlExample.
6 7 8 9 |
# File 'lib/rspec_api_documentation/views/html_example.rb', line 6 def initialize(example, configuration) super self.template_name = "rspec_api_documentation/html_example" end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class RspecApiDocumentation::Views::MarkupExample
Instance Method Details
#extension ⇒ Object
11 12 13 |
# File 'lib/rspec_api_documentation/views/html_example.rb', line 11 def extension EXTENSION end |
#styles ⇒ Object
15 16 17 18 19 |
# File 'lib/rspec_api_documentation/views/html_example.rb', line 15 def styles app_styles_url = RspecApiDocumentation.configuration. gem_styles_url = File.join(File.dirname(__FILE__), "..", "assets", "stylesheets","rspec_api_documentation", "styles.css") return File.read(app_styles_url) rescue File.read(gem_styles_url) end |