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.



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

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

Instance Attribute Details

#argvObject (readonly)

Returns the value of attribute argv.



11
12
13
# File 'lib/openpull/runner.rb', line 11

def argv
  @argv
end

#optionsObject

Returns the value of attribute options.



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

def options
  @options
end

Class Method Details

.run(argv = []) ⇒ Object



6
7
8
# File 'lib/openpull/runner.rb', line 6

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

Instance Method Details

#runObject



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

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

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