Class: Pair::Cli::Config

Inherits:
Pair::Cli show all
Defined in:
lib/pair/cli/config.rb

Instance Attribute Summary

Attributes inherited from Pair::Cli

#arguments, #options

Instance Method Summary collapse

Methods inherited from Pair::Cli

#initialize, run!

Constructor Details

This class inherits a constructor from Pair::Cli

Instance Method Details

#parse!Object



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/pair/cli/config.rb', line 10

def parse!
  opts = parse do |opts|
    opts.banner = "Usage: #{$0.split("/").last} config" +
                  "\n\n" +
                  "Options:" +
                  "\n"

    opts.on("-t", "--api-token KEY") do |key|
      options[:api_token] = key
    end

    opts.on("-g", "--growl") do
      options[:growl] = true
    end
  end
end

#run!Object



4
5
6
7
8
# File 'lib/pair/cli/config.rb', line 4

def run!
  parse!

  Pair.config(options)
end