Files

Class/Module Index [+]

Quicksearch

Capistrano::CLI::Options

Attributes

options[R]

The hash of (parsed) command-line options

Public Class Methods

included(base) click to toggle source
# File lib/capistrano/cli/options.rb, line 6
def self.included(base)
  base.extend(ClassMethods)
end

Public Instance Methods

coerce_variable(value) click to toggle source
# File lib/capistrano/cli/options.rb, line 229
def coerce_variable(value)
  case value
  when /^"(.*)"$/ then $1
  when /^'(.*)'$/ then $1
  when /^\d+$/ then value.to_i
  when /^\d+\.\d*$/ then value.to_f
  when "true" then true
  when "false" then false
  when "nil" then nil
  else value
  end
end
coerce_variable_types!() click to toggle source
# File lib/capistrano/cli/options.rb, line 221
def coerce_variable_types!
  [:pre_vars, :vars].each do |collection|
    options[collection].keys.each do |key|
      options[collection][key] = coerce_variable(options[collection][key])
    end
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.