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 210
210:       def coerce_variable(value)
211:         case value
212:         when /^"(.*)"$/ then $1
213:         when /^'(.*)'$/ then $1
214:         when /^\d+$/ then value.to_i
215:         when /^\d+\.\d*$/ then value.to_f
216:         when "true" then true
217:         when "false" then false
218:         when "nil" then nil
219:         else value
220:         end
221:       end

[Source]

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

[Source]

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

[Source]

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

[Validate]