Class: Spiker::Generators::Given

Inherits:
BaseGenerator show all
Defined in:
lib/spiker/generators/given.rb

Overview

Generates a single spike file, with supporting infrastructure. For simpler spikes that don’t need a ton of organization.

Instance Method Summary collapse

Methods inherited from BaseGenerator

#create_docker_files, #create_env_file, #create_gem_file, #create_guard_file, #create_spike_directory, #generator_name, #run_bundle_install, #run_git_init, source_root

Instance Method Details

#create_spike_fileObject



8
9
10
11
# File 'lib/spiker/generators/given.rb', line 8

def create_spike_file
  opts = { name_as_class: Spiker.classify(spike_name) }
  template("#{generator_name}/app.rb.tt", "#{spike_name}/app.rb", opts)
end