class RealNotification::Generators::ChannelGenerator

Public Instance Methods

create_channel_file() click to toggle source
# File lib/generators/real_notification/channel/channel_generator.rb, line 10
def create_channel_file
  template "notification_channel.rb", "app/channels/#{file_name}_channel.rb"
end
create_coffee_script() click to toggle source
# File lib/generators/real_notification/channel/channel_generator.rb, line 14
def create_coffee_script
  template "notification.js", "app/assets/javascripts/channels/#{file_name}.js"
end

Private Instance Methods

class_name_for_file() click to toggle source
# File lib/generators/real_notification/channel/channel_generator.rb, line 24
def class_name_for_file
  channel_name.underscore.downcase.split('_').map(&:capitalize).join
end
file_name() click to toggle source
# File lib/generators/real_notification/channel/channel_generator.rb, line 20
def file_name
  channel_name.underscore
end