Class: AskIt::SurveyGenerator

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

Constant Summary collapse

TEMPLATES =
%w[active_admin rails_admin plain routes].freeze

Instance Method Summary collapse

Instance Method Details

#create_resolutionObject



14
15
16
17
18
19
20
21
22
# File 'lib/generators/ask_it/survey_generator.rb', line 14

def create_resolution
  strategy = arguments.first
  if TEMPLATES.include? strategy
    send("generate_#{strategy}_resolution")
    success_message(strategy)
  else
    error_message(strategy)
  end
end