class Fixingthenet::Installer::Command

Attributes

app[R]
args[R]
options[R]

Public Class Methods

new(_options, args=[]) click to toggle source
# File lib/fixingthenet/installer/command.rb, line 8
def initialize(_options, args=[])
  @options=_options
  @args=args
  parse_options unless args.empty?

  @app=App.new(options)
  puts "options: #{options}" if options[:verbose]
  command
end

Private Instance Methods

parse_common_options(opts) click to toggle source
# File lib/fixingthenet/installer/command.rb, line 20
def parse_common_options(opts)
  opts.on("-v", "--[no-]verbose", "Run verbosely") do |v|
    options[:verbose] = v
  end

  opts.on("-e", "--env ENV", "environment") do |v|
    options[:env] = v
  end

  opts.on("-r", "--root ROOTPATH", "Root") do |op|
    options[:apps_root] = Pathmame.new(op)
  end

  opts.on("-n", "--name NAME", "Name of the plugin") do |op|
    options[:name] = op
  end

end