Class: RspecApiDocumentation::Views::SlateExample

Inherits:
MarkdownExample show all
Defined in:
lib/rspec_api_documentation/views/slate_example.rb

Constant Summary

Constants inherited from MarkdownExample

MarkdownExample::EXTENSION

Constants inherited from MarkupExample

MarkupExample::SPECIAL_CHARS

Instance Method Summary collapse

Methods inherited from MarkdownExample

#extension

Methods inherited from MarkupExample

#dirname, #extension, #filename, #method_missing, #requests, #respond_to?, #response_fields

Constructor Details

#initialize(example, configuration) ⇒ SlateExample

Returns a new instance of SlateExample.



4
5
6
7
# File 'lib/rspec_api_documentation/views/slate_example.rb', line 4

def initialize(example, configuration)
  super
  self.template_name = "rspec_api_documentation/slate_example"
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class RspecApiDocumentation::Views::MarkupExample

Instance Method Details

#parametersObject



9
10
11
12
13
14
15
# File 'lib/rspec_api_documentation/views/slate_example.rb', line 9

def parameters
  super.map do |parameter|
    parameter.merge({
      :required => parameter[:required] == 'true' ? true : false,
    })
  end
end