Module Capistrano::CLI::Options
In: lib/capistrano/cli/options.rb
lib/capistrano/cli/options.rb

Methods

Classes and Modules

Module Capistrano::CLI::Options::ClassMethods

Attributes

options  [R]  The hash of (parsed) command-line options
options  [R]  The hash of (parsed) command-line options

Public Class methods

[Source]

   # File lib/capistrano/cli/options.rb, line 6
6:       def self.included(base)
7:         base.extend(ClassMethods)
8:       end

[Source]

   # File lib/capistrano/cli/options.rb, line 6
6:       def self.included(base)
7:         base.extend(ClassMethods)
8:       end

Public Instance methods

[Source]

     # File lib/capistrano/cli/options.rb, line 212
212:       def coerce_variable(value)
213:         case value
214:         when /^"(.*)"$/ then $1
215:         when /^'(.*)'$/ then $1
216:         when /^\d+$/ then value.to_i
217:         when /^\d+\.\d*$/ then value.to_f
218:         when "true" then true
219:         when "false" then false
220:         when "nil" then nil
221:         else value
222:         end
223:       end

[Source]

     # File lib/capistrano/cli/options.rb, line 212
212:       def coerce_variable(value)
213:         case value
214:         when /^"(.*)"$/ then $1
215:         when /^'(.*)'$/ then $1
216:         when /^\d+$/ then value.to_i
217:         when /^\d+\.\d*$/ then value.to_f
218:         when "true" then true
219:         when "false" then false
220:         when "nil" then nil
221:         else value
222:         end
223:       end

[Source]

     # File lib/capistrano/cli/options.rb, line 204
204:       def coerce_variable_types!
205:         [:pre_vars, :vars].each do |collection|
206:           options[collection].keys.each do |key|
207:             options[collection][key] = coerce_variable(options[collection][key])
208:           end
209:         end
210:       end

[Source]

     # File lib/capistrano/cli/options.rb, line 204
204:       def coerce_variable_types!
205:         [:pre_vars, :vars].each do |collection|
206:           options[collection].keys.each do |key|
207:             options[collection][key] = coerce_variable(options[collection][key])
208:           end
209:         end
210:       end

[Validate]