Sha256: 3cab5ba2b39b3f09b86882f028d60cd0619dc144187f0fbb0878543db5d5a03f
Contents?: true
Size: 685 Bytes
Versions: 16
Compression:
Stored size: 685 Bytes
Contents
module Eyeballs class ControllerGenerator < Thor::Group include Thor::Actions include Eyeballs::AppDetector desc "Creates a new eyeballs.js controller" argument :name def self.source_root File.join(File.dirname(__FILE__), '..', '..') end def greeting $stdout.puts "Creating new eyeballs.js controller #{name.pluralize}Controller" end def build_the_model template "templates/controller.js", "#{app_path}/app/controllers/#{name.downcase}_controller.js" empty_directory "#{app_path}/app/views/#{name.downcase}" end def farewell $stdout.puts "Your controller is ready to rule!" end end end
Version data entries
16 entries across 16 versions & 1 rubygems