Sha256: 4c432d6d262df12c1a57ef15ff37c22db255fa629c7b4e9ead06e5c04caa3226

Contents?: true

Size: 622 Bytes

Versions: 19

Compression:

Stored size: 622 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"
    end
  
    def farewell
      $stdout.puts "Your controller is ready to rule!"
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
eyeballs-0.5.7.2 lib/eyeballs/controller_generator.rb
eyeballs-0.5.7.1 lib/eyeballs/controller_generator.rb
eyeballs-0.5.7 lib/eyeballs/controller_generator.rb
eyeballs-0.5.6.1 lib/eyeballs/controller_generator.rb
eyeballs-0.5.6 lib/eyeballs/controller_generator.rb
eyeballs-0.5.5 lib/eyeballs/controller_generator.rb
eyeballs-0.5.4 lib/eyeballs/controller_generator.rb
eyeballs-0.5.3 lib/eyeballs/controller_generator.rb
eyeballs-0.5.2 lib/eyeballs/controller_generator.rb
eyeballs-0.5.1 lib/eyeballs/controller_generator.rb
eyeballs-0.5.0 lib/eyeballs/controller_generator.rb
eyeballs-0.4.2 lib/eyeballs/controller_generator.rb
eyeballs-0.4.1 lib/eyeballs/controller_generator.rb
eyeballs-0.3.7 lib/eyeballs/controller_generator.rb
eyeballs-0.3.6.1 lib/eyeballs/controller_generator.rb
eyeballs-0.3.6 lib/eyeballs/controller_generator.rb
eyeballs-0.3.5 lib/eyeballs/controller_generator.rb
eyeballs-0.3.4.1 lib/eyeballs/controller_generator.rb
eyeballs-0.3.4 lib/eyeballs/controller_generator.rb