Class: Bin::BinGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/bin/bin_generator.rb

Instance Method Summary collapse

Instance Method Details

#add_filesObject



8
9
10
11
12
13
# File 'lib/generators/bin/bin_generator.rb', line 8

def add_files
  template "script.rb", "bin/#{file_path}.rb"
  template "script_class.rb", "app/models/bin/#{file_path}_script.rb"
  template "spec.rb", "spec/models/bin/#{file_path}_script_spec.rb"
  chmod "bin/#{file_path}.rb", 0755
end