build

build(klass, params=nil) Class Public methods GET new POST create

all

all(klass) Class Public methods GET index

log

log(*args) Instance Protected methods Define log for backwards compatibility. If just one argument is sent, invoke say, otherwise invoke say_status. Differently from say and similarly to say_status, this method respects the quiet? option given.

extify

extify(name) Instance Protected methods Add an extension to the given name based on the platform.

vendor

vendor(filename, data=nil, &block) Instance Public methods Create a new file in the vendor/ directory. Code can be specified in a block or a data string can be given. vendor("sekrit.rb") do sekrit_salt = "#{Time.now}--#{3.years.ago}--#{rand}--" "salt = '#{sekrit_salt}'" end vendor("foreign.rb", "# Foreign code is fun")

route

route(routing_code) Instance Public methods Make an entry in Rails routing file config/routes.rb route "root 'welcome#index'"

readme

readme(path) Instance Public methods Reads the given file at the source root and prints it in the console. readme "README"

rakefile

rakefile(filename, data=nil, &block) Instance Public methods Create a new Rakefile with the provided code (either in a block or a string). rakefile("bootstrap.rake") do project = ask("What is the UNIX name of your project?") <<-TASK namespace :#{project} do task :bootstrap do puts "I like boots!" end end TASK end rakefile('seed.rake', 'puts "Planting seeds"')

rake

rake(command, options={}) Instance Public methods Runs the supplied rake task rake("db:migrate") rake("db:migrate", env: "production") rake("gems:install", sudo: true)

lib

lib(filename, data=nil, &block) Instance Public methods Create a new file in the lib/ directory. Code can be specified in a block or a data string can be given. lib("crypto.rb") do "crypted_special_value = '#{rand}--#{Time.now}--#{rand(1337)}--'" end lib("foreign.rb", "# Foreign code is fun")