Class: GithubEventsExport::CLI

Inherits:
Object
  • Object
show all
Defined in:
lib/github_events_export/cli.rb

Overview

Entrypoint for CLI usage

Constant Summary collapse

STATUS_SUCCESS =
0
STATUS_FAILURE =
1

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ CLI

Returns a new instance of CLI.



13
14
15
# File 'lib/github_events_export/cli.rb', line 13

def initialize(options)
  @options = options
end

Class Method Details

.run(argv) ⇒ Object



9
10
11
# File 'lib/github_events_export/cli.rb', line 9

def self.run(argv)
  new(Options.new(argv)).run
end

Instance Method Details

#runObject



17
18
19
20
# File 'lib/github_events_export/cli.rb', line 17

def run
  Export.new(client).run
  STATUS_SUCCESS
end