class Gossiper::NotificationTypeGenerator
Public Instance Methods
create_class_file()
click to toggle source
# File lib/generators/gossiper/notification_type/notification_type_generator.rb, line 4 def create_class_file template 'notification_type.rb', File.join( Gossiper.configuration.notifications_root_folder.to_s, 'notifications', class_path, "#{singular_name}_notification.rb" ) end
create_template()
click to toggle source
# File lib/generators/gossiper/notification_type/notification_type_generator.rb, line 24 def create_template template 'notification_type_template.rb', File.join( Gossiper.configuration.notifications_template_folder.to_s, 'notifications', class_path, "#{singular_name}_notification.html.erb" ) end
create_test_file()
click to toggle source
# File lib/generators/gossiper/notification_type/notification_type_generator.rb, line 13 def create_test_file test_sufix = defined?(RSpec) ? 'spec' : 'test' template "notification_type_#{test_sufix}.rb", File.join( Gossiper.configuration.notifications_test_folder.to_s, 'notifications', class_path, "#{singular_name}_notification_#{test_sufix}.rb" ) end