Class: BinGenerator

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

Instance Method Summary collapse

Instance Method Details

#manifestObject



24
25
26
27
28
29
30
31
32
# File 'lib/generators/bin/bin_generator.rb', line 24

def manifest
  record do |m|
    file_name.sub!('_script', '')
    m.template "script.rb", "bin/#{file_path}", :chmod => 0755
    m.template "script_class.rb", "app/bins/#{file_path}_script.rb"
    m.directory "spec/bins"
    m.template "spec.rb", "spec/bins/#{file_path}_script_spec.rb"
  end
end