Class: PushToSns::Generators::NotifierGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- PushToSns::Generators::NotifierGenerator
- Defined in:
- lib/rails/generators/push_to_sns/notifier_generator.rb
Overview
rails generate push_to_sns:notifier new_goal goal
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
11 12 13 |
# File 'lib/rails/generators/push_to_sns/notifier_generator.rb', line 11 def self.source_root @source_root ||= File.("../templates", __FILE__) end |
Instance Method Details
#create_notifier ⇒ Object
15 16 17 18 19 |
# File 'lib/rails/generators/push_to_sns/notifier_generator.rb', line 15 def create_notifier template "notifier.rb", File.join( "app/push_notifiers", "#{file_name}_notifier.rb" ) end |