Class: Bickle::Build

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

Instance Method Summary collapse

Constructor Details

#initialize(build) ⇒ Build

Returns a new instance of Build.



3
4
5
# File 'lib/bickle/build.rb', line 3

def initialize(build)
  @build   = build
end

Instance Method Details

#branchObject



43
44
45
# File 'lib/bickle/build.rb', line 43

def branch
  @build["branch"]
end

#commitObject



39
40
41
# File 'lib/bickle/build.rb', line 39

def commit
  @build["commit"]
end

#durationObject



35
36
37
# File 'lib/bickle/build.rb', line 35

def duration
  @build["duration"]
end

#event_typeObject



51
52
53
# File 'lib/bickle/build.rb', line 51

def event_type
  @build["event_type"]
end

#fail?Boolean

Returns:

  • (Boolean)


59
60
61
# File 'lib/bickle/build.rb', line 59

def fail?
  result == 1
end

#finished_atObject



31
32
33
# File 'lib/bickle/build.rb', line 31

def finished_at
  @build["finished_at"]
end

#idObject



7
8
9
# File 'lib/bickle/build.rb', line 7

def id
  @build["id"]
end

#messageObject



47
48
49
# File 'lib/bickle/build.rb', line 47

def message
  message = @build["message"]
end

#numberObject



15
16
17
# File 'lib/bickle/build.rb', line 15

def number
  @build["number"]
end

#pass?Boolean

Returns:

  • (Boolean)


55
56
57
# File 'lib/bickle/build.rb', line 55

def pass?
  result == 0
end

#pending?Boolean

Returns:

  • (Boolean)


63
64
65
# File 'lib/bickle/build.rb', line 63

def pending?
  result == nil
end

#repository_idObject



11
12
13
# File 'lib/bickle/build.rb', line 11

def repository_id
  @build["repository_id"]
end

#resultObject



23
24
25
# File 'lib/bickle/build.rb', line 23

def result
  @build["result"]
end

#started_atObject



27
28
29
# File 'lib/bickle/build.rb', line 27

def started_at
  @build["started_at"]
end

#stateObject



19
20
21
# File 'lib/bickle/build.rb', line 19

def state
  @build["state"]
end