Class: Twilio::Rails::SmsResponderGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Twilio::Rails::SmsResponderGenerator
- Defined in:
- lib/generators/twilio/rails/sms_responder/sms_responder_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_template_responder ⇒ Object
6 7 8 |
# File 'lib/generators/twilio/rails/sms_responder/sms_responder_generator.rb', line 6 def copy_template_responder template "responder.rb.erb", "app/sms_responders/#{file_name}_responder.rb" end |
#register_responder ⇒ Object
10 11 12 |
# File 'lib/generators/twilio/rails/sms_responder/sms_responder_generator.rb', line 10 def register_responder insert_into_file "config/initializers/twilio_rails.rb", "\n config.sms_responders.register { #{class_name}Responder }", before: "\nend\n" end |