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

Version Path
eyeballs-0.5.17 lib/eyeballs/controller_generator.rb
eyeballs-0.5.16 lib/eyeballs/controller_generator.rb
eyeballs-0.5.15 lib/eyeballs/controller_generator.rb
eyeballs-0.5.14 lib/eyeballs/controller_generator.rb
eyeballs-0.5.13.2 lib/eyeballs/controller_generator.rb
eyeballs-0.5.13.1 lib/eyeballs/controller_generator.rb
eyeballs-0.5.13 lib/eyeballs/controller_generator.rb
eyeballs-0.5.12.1 lib/eyeballs/controller_generator.rb
eyeballs-0.5.12 lib/eyeballs/controller_generator.rb
eyeballs-0.5.11 lib/eyeballs/controller_generator.rb
eyeballs-0.5.10.1 lib/eyeballs/controller_generator.rb
eyeballs-0.5.10 lib/eyeballs/controller_generator.rb
eyeballs-0.5.9 lib/eyeballs/controller_generator.rb
eyeballs-0.5.8.2 lib/eyeballs/controller_generator.rb
eyeballs-0.5.8.1 lib/eyeballs/controller_generator.rb
eyeballs-0.5.8 lib/eyeballs/controller_generator.rb