Class: BuildPresenter

Inherits:
BasePresenter show all
Defined in:
app/presenters/build_presenter.rb

Instance Method Summary collapse

Methods inherited from BasePresenter

inherited, #initialize, #to_model, use_presenters

Constructor Details

This class inherits a constructor from BasePresenter

Instance Method Details

#duplicate?Boolean

Returns:

  • (Boolean)

7
8
9
# File 'app/presenters/build_presenter.rb', line 7

def duplicate?
  status == 'duplicate'
end

#durationObject


15
16
17
# File 'app/presenters/build_presenter.rb', line 15

def duration
  finished_at.to_i - started_at.to_i
end

#finished?Boolean

Returns:

  • (Boolean)

11
12
13
# File 'app/presenters/build_presenter.rb', line 11

def finished?
  status != 'created' && status != 'running'
end

#no_sources_found?Boolean

Returns:

  • (Boolean)

19
20
21
# File 'app/presenters/build_presenter.rb', line 19

def no_sources_found?
  !!(stderr.to_s =~ /no sources found/i)
end