class Fuci::Travis::CliOptions

Constants

PULL_REQUEST_INDICATORS

Public Class Methods

branch() click to toggle source
# File lib/fuci/travis/cli_options.rb, line 6
def self.branch
  argv.first
end
pull_request?() click to toggle source
# File lib/fuci/travis/cli_options.rb, line 10
def self.pull_request?
  (argv & PULL_REQUEST_INDICATORS).any?
end
pull_request_branch() click to toggle source
# File lib/fuci/travis/cli_options.rb, line 14
def self.pull_request_branch
  branch = nil

  argv.each_with_index do |arg, index|
    if PULL_REQUEST_INDICATORS.include? arg
      branch = argv[index+1]
    end
  end

  branch
end

Private Class Methods

argv() click to toggle source
# File lib/fuci/travis/cli_options.rb, line 28
def self.argv
  Fuci::CliOptions.argv
end