Class: GetSchwifty::Generators::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/get_schwifty/install_generator.rb

Overview

:nodoc

Instance Method Summary collapse

Instance Method Details

#autoload_cables_pathObject



36
37
38
# File 'lib/generators/get_schwifty/install_generator.rb', line 36

def autoload_cables_path
  application %(config.autoload_paths << config.root.join("app", "cables"))
end

#copy_base_cableObject



32
33
34
# File 'lib/generators/get_schwifty/install_generator.rb', line 32

def copy_base_cable
  template "cables/base_cable.rb", "app/cables/base_cable.rb"
end

#copy_channelObject



19
20
21
# File 'lib/generators/get_schwifty/install_generator.rb', line 19

def copy_channel
  template "channels/get_schwifty_channel.rb", "app/channels/get_schwifty_channel.rb"
end

#copy_controllerObject



15
16
17
# File 'lib/generators/get_schwifty/install_generator.rb', line 15

def copy_controller
  template "controllers/get_schwifty_controller.rb", "app/controllers/get_schwifty_controller.rb"
end

#copy_get_schwifty_channel_jsObject



40
41
42
# File 'lib/generators/get_schwifty/install_generator.rb', line 40

def copy_get_schwifty_channel_js
  template "assets/javascripts/get_schwifty_channel.js", "app/assets/javascripts/channels/get_schwifty_channel.js"
end

#copy_initializerObject



11
12
13
# File 'lib/generators/get_schwifty/install_generator.rb', line 11

def copy_initializer
  template "get_schwifty.rb", "config/initializers/get_schwifty.rb"
end

#copy_jobObject



23
24
25
# File 'lib/generators/get_schwifty/install_generator.rb', line 23

def copy_job
  template "jobs/get_schwifty_runner_job.rb", "app/jobs/get_schwifty_runner_job.rb"
end

#create_cables_directoriesObject



27
28
29
30
# File 'lib/generators/get_schwifty/install_generator.rb', line 27

def create_cables_directories
  empty_directory "app/cables"
  empty_directory "app/views/cables"
end


44
45
46
# File 'lib/generators/get_schwifty/install_generator.rb', line 44

def print_readme
  readme "INSTALL"
end