class ShoutOut::Generators::ShoutGenerator

Public Instance Methods

copy_file() click to toggle source
# File lib/generators/shout_out/shout/shout_generator.rb, line 7
def copy_file
  if model_name.underscore.include? '_shout'
    file = "app/shouts/#{model_name.underscore}.rb"
  else
    file = "app/shouts/#{model_name.underscore}_shout.rb"
  end

  template 'shout.rb', file
end