Class: Bard::CLI::CI

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/bard/ci.rb

Defined Under Namespace

Classes: Local, Remote

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(project_name, sha, local: false) ⇒ CI

Returns a new instance of CI.



7
8
9
10
11
12
# File 'lib/bard/ci.rb', line 7

def initialize project_name, sha, local: false
  @project_name = project_name
  @sha = sha
  @local = !!local
  @runner = @local ? Local.new(project_name, sha) : Remote.new(project_name, sha)
end

Instance Attribute Details

#project_nameObject (readonly)

Returns the value of attribute project_name.



14
15
16
# File 'lib/bard/ci.rb', line 14

def project_name
  @project_name
end

#runnerObject (readonly)

Returns the value of attribute runner.



14
15
16
# File 'lib/bard/ci.rb', line 14

def runner
  @runner
end

#shaObject (readonly)

Returns the value of attribute sha.



14
15
16
# File 'lib/bard/ci.rb', line 14

def sha
  @sha
end

Instance Method Details

#local?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/bard/ci.rb', line 16

def local?
  @local
end