Class: RailsApiBenchmark::Renderer

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_api_benchmark/renderer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(target, results) ⇒ Renderer

Returns a new instance of Renderer.



5
6
7
8
9
# File 'lib/rails_api_benchmark/renderer.rb', line 5

def initialize(target, results)
  @output_dir = RailsApiBenchmark.config.results_folder
  @target = target
  @results = results
end

Instance Attribute Details

#output_dirObject (readonly)

Returns the value of attribute output_dir.



3
4
5
# File 'lib/rails_api_benchmark/renderer.rb', line 3

def output_dir
  @output_dir
end

#resultsObject (readonly)

Returns the value of attribute results.



3
4
5
# File 'lib/rails_api_benchmark/renderer.rb', line 3

def results
  @results
end

#targetObject (readonly)

Returns the value of attribute target.



3
4
5
# File 'lib/rails_api_benchmark/renderer.rb', line 3

def target
  @target
end

Instance Method Details

#processObject



11
12
13
14
# File 'lib/rails_api_benchmark/renderer.rb', line 11

def process
  Graph.new(@target, @output_dir).generate
  generate_view
end