class GithubEventsExport::CLI

Entrypoint for CLI usage

Constants

STATUS_FAILURE
STATUS_SUCCESS

Attributes

options[R]

Public Class Methods

new(options) click to toggle source
# File lib/github_events_export/cli.rb, line 13
def initialize(options)
  @options = options
end
run(argv) click to toggle source
# File lib/github_events_export/cli.rb, line 9
def self.run(argv)
  new(Options.new(argv)).run
end

Public Instance Methods

run() click to toggle source
# File lib/github_events_export/cli.rb, line 17
def run
  Export.new(client).run
  STATUS_SUCCESS
end

Private Instance Methods

client() click to toggle source
# File lib/github_events_export/cli.rb, line 26
def client
  @client ||= ::Octokit::Client.new(
    access_token: options[:token],
    auto_paginate: true
  )
end