Class: Sleet::Build

Inherits:
Object
  • Object
show all
Defined in:
lib/sleet/build.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(circle_ci_token:, github_user:, github_repo:, build_num:) ⇒ Build

Returns a new instance of Build.



7
8
9
10
11
12
# File 'lib/sleet/build.rb', line 7

def initialize(circle_ci_token:, github_user:, github_repo:, build_num:)
  @circle_ci_token = circle_ci_token
  @github_user = github_user
  @github_repo = github_repo
  @build_num = build_num
end

Instance Attribute Details

#build_numObject (readonly)

Returns the value of attribute build_num.



5
6
7
# File 'lib/sleet/build.rb', line 5

def build_num
  @build_num
end

Instance Method Details

#artifactsObject



14
15
16
# File 'lib/sleet/build.rb', line 14

def artifacts
  @artifacts ||= JSON.parse(Sleet::CircleCi.get(url, circle_ci_token).body)
end