Class: UffizziCore::Build

Inherits:
ApplicationRecord show all
Includes:
BuildRepo
Defined in:
app/models/uffizzi_core/build.rb

Constant Summary collapse

BUILDING =
1
SUCCESS =
2
FAILED =
3
TIMEOUT =
4
CANCELLED =
5

Instance Method Summary collapse

Instance Method Details

#building?Boolean

Returns:

  • (Boolean)


28
29
30
# File 'app/models/uffizzi_core/build.rb', line 28

def building?
  status == BUILDING
end

#cancelled?Boolean

Returns:

  • (Boolean)


36
37
38
# File 'app/models/uffizzi_core/build.rb', line 36

def cancelled?
  status == CANCELLED
end

#failed?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'app/models/uffizzi_core/build.rb', line 24

def failed?
  status == FAILED
end

#successful?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'app/models/uffizzi_core/build.rb', line 16

def successful?
  status == SUCCESS
end

#timed_out?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'app/models/uffizzi_core/build.rb', line 32

def timed_out?
  status == TIMEOUT
end

#unsuccessful?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'app/models/uffizzi_core/build.rb', line 20

def unsuccessful?
  [FAILED, TIMEOUT, CANCELLED].include?(status)
end