Class: OpenPull::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/openpull/runner.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(argv = []) ⇒ Runner

Returns a new instance of Runner.



16
17
18
19
# File 'lib/openpull/runner.rb', line 16

def initialize(argv = [])
  @argv    = argv
  @options = {}
end

Instance Attribute Details

#argvObject (readonly)

Returns the value of attribute argv.



13
14
15
# File 'lib/openpull/runner.rb', line 13

def argv
  @argv
end

#optionsObject

Returns the value of attribute options.



14
15
16
# File 'lib/openpull/runner.rb', line 14

def options
  @options
end

Class Method Details

.run(argv = []) ⇒ Object



8
9
10
# File 'lib/openpull/runner.rb', line 8

def run(argv = [])
  new(argv).run
end

Instance Method Details

#runObject



21
22
23
24
25
26
27
28
29
# File 'lib/openpull/runner.rb', line 21

def run
  op = option_parser
  op.parse!
  check_options(op)

  puts OpenPull::Client.new(@options[:access_token],
                            @options[:organisation],
                            @options[:username]).show_table
end