Class: InchCI::Worker::Build::Result

Inherits:
Struct
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/inch_ci/worker/build/result.rb

Direct Known Subclasses

ResultDeffered, ResultFail, ResultSuccess

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#badge_in_readmeObject

Returns the value of attribute badge_in_readme.



15
16
17
# File 'lib/inch_ci/worker/build/result.rb', line 15

def badge_in_readme
  @badge_in_readme
end

#branch_nameObject

Returns the value of attribute branch_name

Returns:

  • (Object)

    the current value of branch_name



4
5
6
# File 'lib/inch_ci/worker/build/result.rb', line 4

def branch_name
  @branch_name
end

#finished_atObject

Returns the value of attribute finished_at.



16
17
18
# File 'lib/inch_ci/worker/build/result.rb', line 16

def finished_at
  @finished_at
end

#latest_revisionObject

Returns the value of attribute latest_revision

Returns:

  • (Object)

    the current value of latest_revision



4
5
6
# File 'lib/inch_ci/worker/build/result.rb', line 4

def latest_revision
  @latest_revision
end

#objectsObject

Returns the value of attribute objects

Returns:

  • (Object)

    the current value of objects



4
5
6
# File 'lib/inch_ci/worker/build/result.rb', line 4

def objects
  @objects
end

#repoObject

Returns the value of attribute repo

Returns:

  • (Object)

    the current value of repo



4
5
6
# File 'lib/inch_ci/worker/build/result.rb', line 4

def repo
  @repo
end

#started_atObject

Returns the value of attribute started_at.



14
15
16
# File 'lib/inch_ci/worker/build/result.rb', line 14

def started_at
  @started_at
end

#statusObject



27
28
29
# File 'lib/inch_ci/worker/build/result.rb', line 27

def status
  @status || 'error'
end

Instance Method Details

#durationObject



19
20
21
# File 'lib/inch_ci/worker/build/result.rb', line 19

def duration
  finished_at - started_at
end

#revision_uidObject



23
24
25
# File 'lib/inch_ci/worker/build/result.rb', line 23

def revision_uid
  repo.revision
end

#tag_uidObject



31
32
33
# File 'lib/inch_ci/worker/build/result.rb', line 31

def tag_uid
  repo.tag.empty? ? nil : repo.tag
end