Class: RailsApiBenchmark::Views::IndexMarkdown
- Defined in:
- lib/rails_api_benchmark/views/index_markdown.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#nb_routes ⇒ Object
readonly
Returns the value of attribute nb_routes.
-
#routes ⇒ Object
readonly
Returns the value of attribute routes.
Instance Method Summary collapse
-
#extension ⇒ Object
Maybe put this in a superclass like MarkdownView to DRY.
-
#initialize ⇒ IndexMarkdown
constructor
A new instance of IndexMarkdown.
Methods inherited from View
#file_name, #file_path, #folder, #render, #write
Constructor Details
#initialize ⇒ IndexMarkdown
Returns a new instance of IndexMarkdown.
8 9 10 11 12 13 |
# File 'lib/rails_api_benchmark/views/index_markdown.rb', line 8 def initialize super @file_name = 'README' @routes = @config.routes @nb_routes = routes.count end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
6 7 8 |
# File 'lib/rails_api_benchmark/views/index_markdown.rb', line 6 def config @config end |
#nb_routes ⇒ Object (readonly)
Returns the value of attribute nb_routes.
6 7 8 |
# File 'lib/rails_api_benchmark/views/index_markdown.rb', line 6 def nb_routes @nb_routes end |
#routes ⇒ Object (readonly)
Returns the value of attribute routes.
6 7 8 |
# File 'lib/rails_api_benchmark/views/index_markdown.rb', line 6 def routes @routes end |
Instance Method Details
#extension ⇒ Object
Maybe put this in a superclass like MarkdownView to DRY
16 17 18 |
# File 'lib/rails_api_benchmark/views/index_markdown.rb', line 16 def extension 'md' end |