Class: Rails::Generators::BenchmarkGenerator

Inherits:
NamedBase
  • Object
show all
Defined in:
railties/lib/rails/generators/rails/benchmark/benchmark_generator.rb

Constant Summary collapse

IPS_GEM_NAME =
"benchmark-ips"
IPS_GEM_USED_REGEXP =
/gem.*\b#{IPS_GEM_NAME}\b.*/

Instance Method Summary collapse

Instance Method Details

#generate_layoutObject



13
14
15
16
# File 'railties/lib/rails/generators/rails/benchmark/benchmark_generator.rb', line 13

def generate_layout
  add_ips_to_gemfile unless ips_installed?
  template("benchmark.rb.tt", "script/benchmarks/#{file_name}.rb")
end