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
5 6 7 |
# File 'lib/generators/twilio/rails/sms_responder/sms_responder_generator.rb', line 5 def copy_template_responder template "responder.rb.erb", "app/sms_responders/#{file_name}_responder.rb" end |
#register_responder ⇒ Object
9 10 11 |
# File 'lib/generators/twilio/rails/sms_responder/sms_responder_generator.rb', line 9 def register_responder insert_into_file "config/initializers/twilio_rails.rb", "\n config.sms_responders.register { #{class_name}Responder }", before: "\nend\n" end |