Class: RailsApiBenchmark::Views::ResultsMarkdown

Inherits:
View
  • Object
show all
Defined in:
lib/rails_api_benchmark/views/results_markdown.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from View

#file_name, #file_path, #render, #write

Constructor Details

#initialize(target, results) ⇒ ResultsMarkdown

Returns a new instance of ResultsMarkdown.



8
9
10
11
12
13
# File 'lib/rails_api_benchmark/views/results_markdown.rb', line 8

def initialize(target, results)
  super
  @file_name = 'results'
  @target = target
  @results = results
end

Instance Attribute Details

#resultsObject (readonly)

Returns the value of attribute results.



6
7
8
# File 'lib/rails_api_benchmark/views/results_markdown.rb', line 6

def results
  @results
end

#targetObject (readonly)

Returns the value of attribute target.



6
7
8
# File 'lib/rails_api_benchmark/views/results_markdown.rb', line 6

def target
  @target
end

#titleObject (readonly)

Returns the value of attribute title.



6
7
8
# File 'lib/rails_api_benchmark/views/results_markdown.rb', line 6

def title
  @title
end

Instance Method Details

#extensionObject

Maybe put this in a superclass like MarkdownView to DRY



16
17
18
# File 'lib/rails_api_benchmark/views/results_markdown.rb', line 16

def extension
  'md'
end

#folderObject



20
21
22
# File 'lib/rails_api_benchmark/views/results_markdown.rb', line 20

def folder
  @target.name
end