Class: Twilio::Rails::PhoneTreeGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Twilio::Rails::PhoneTreeGenerator
- Defined in:
- lib/generators/twilio/rails/phone_tree/phone_tree_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_template_tree ⇒ Object
5 6 7 |
# File 'lib/generators/twilio/rails/phone_tree/phone_tree_generator.rb', line 5 def copy_template_tree template "tree.rb.erb", "app/phone_trees/#{file_name}_tree.rb" end |
#register_tree ⇒ Object
9 10 11 |
# File 'lib/generators/twilio/rails/phone_tree/phone_tree_generator.rb', line 9 def register_tree insert_into_file "config/initializers/twilio_rails.rb", "\n config.phone_trees.register { #{class_name}Tree }", before: "\nend\n" end |