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(routes) ⇒ IndexMarkdown
constructor
A new instance of IndexMarkdown.
Methods inherited from View
#file_name, #file_path, #folder
Constructor Details
#initialize(routes) ⇒ IndexMarkdown
Returns a new instance of IndexMarkdown.
8 9 10 11 12 13 14 |
# File 'lib/rails_api_benchmark/views/index_markdown.rb', line 8 def initialize(routes) super @file_name = 'README' @config = RailsApiBenchmark.config.all @routes = 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
17 18 19 |
# File 'lib/rails_api_benchmark/views/index_markdown.rb', line 17 def extension 'md' end |