Class: MethadoneGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/methadone_generator.rb

Instance Method Summary collapse

Instance Method Details

#generate_commandObject



5
6
7
8
# File 'lib/generators/methadone_generator.rb', line 5

def generate_command
  template 'command', "bin/#{command_name}"
  chmod "bin/#{command_name}", 0777
end

#generate_featuresObject



10
11
12
# File 'lib/generators/methadone_generator.rb', line 10

def generate_features
  template 'command.feature', "features/bin/#{command_name}.feature"
end

#generate_steps_fileObject



14
15
16
# File 'lib/generators/methadone_generator.rb', line 14

def generate_steps_file
  template 'command_steps.rb', "features/step_definitions/#{command_name}_command_steps.rb"
end