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 225
225:       def coerce_variable(value)
226:         case value
227:         when /^"(.*)"$/ then $1
228:         when /^'(.*)'$/ then $1
229:         when /^\d+$/ then value.to_i
230:         when /^\d+\.\d*$/ then value.to_f
231:         when "true" then true
232:         when "false" then false
233:         when "nil" then nil
234:         else value
235:         end
236:       end

[Source]

     # File lib/capistrano/cli/options.rb, line 225
225:       def coerce_variable(value)
226:         case value
227:         when /^"(.*)"$/ then $1
228:         when /^'(.*)'$/ then $1
229:         when /^\d+$/ then value.to_i
230:         when /^\d+\.\d*$/ then value.to_f
231:         when "true" then true
232:         when "false" then false
233:         when "nil" then nil
234:         else value
235:         end
236:       end

[Source]

     # File lib/capistrano/cli/options.rb, line 217
217:       def coerce_variable_types!
218:         [:pre_vars, :vars].each do |collection|
219:           options[collection].keys.each do |key|
220:             options[collection][key] = coerce_variable(options[collection][key])
221:           end
222:         end
223:       end

[Source]

     # File lib/capistrano/cli/options.rb, line 217
217:       def coerce_variable_types!
218:         [:pre_vars, :vars].each do |collection|
219:           options[collection].keys.each do |key|
220:             options[collection][key] = coerce_variable(options[collection][key])
221:           end
222:         end
223:       end

[Validate]