Class: RailsApiBenchmark::Views::View

Inherits:
Mustache
  • Object
show all
Defined in:
lib/rails_api_benchmark/views/view.rb

Direct Known Subclasses

IndexMarkdown, ResultsMarkdown

Instance Method Summary collapse

Constructor Details

#initialize(*_args) ⇒ View

Returns a new instance of View.



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

def initialize(*_args)
  @template_path = File.expand_path('../../templates', __FILE__)
end

Instance Method Details

#file_nameObject



10
11
12
# File 'lib/rails_api_benchmark/views/view.rb', line 10

def file_name
  "#{@file_name}.#{extension}"
end

#file_pathObject



14
15
16
# File 'lib/rails_api_benchmark/views/view.rb', line 14

def file_path
  [folder, file_name].compact.join('/')
end

#folderObject



18
19
20
# File 'lib/rails_api_benchmark/views/view.rb', line 18

def folder
  nil
end