class Cp8Cli::Ci

Attributes

branch_name[R]
repo[R]

Public Class Methods

new(branch_name:, repo:) click to toggle source
# File lib/cp8_cli/ci.rb, line 3
def initialize(branch_name:, repo:)
  @branch_name = branch_name
  @repo = repo
end

Public Instance Methods

open() click to toggle source
# File lib/cp8_cli/ci.rb, line 8
def open
  Command.open_url url
end

Private Instance Methods

escape(text) click to toggle source
# File lib/cp8_cli/ci.rb, line 20
def escape(text)
  CGI.escape(text)
end
url() click to toggle source
# File lib/cp8_cli/ci.rb, line 16
def url
  "https://circleci.com/gh/#{repo.shorthand}/tree/#{escape branch_name}"
end