Class: ApidocToGFM::Views::Index

Inherits:
RspecApiDocumentation::Views::MarkdownIndex
  • Object
show all
Includes:
Helpers
Defined in:
lib/apidoc_to_gfm/views/index.rb

Instance Method Summary collapse

Methods included from Helpers

#template_exists?, #template_path_from_gem

Constructor Details

#initialize(index, configuration) ⇒ Index

Returns a new instance of Index.



6
7
8
9
10
# File 'lib/apidoc_to_gfm/views/index.rb', line 6

def initialize(index, configuration)
  super
  self.template_name = "rspec_api_documentation/gfm_index"
  self.template_path = template_path_from_gem  unless template_exists?
end

Instance Method Details

#examplesObject



12
13
14
# File 'lib/apidoc_to_gfm/views/index.rb', line 12

def examples
  @index.examples.map { |example| Example.new(example, @configuration) }
end