Class: AgileNotifier::CI::Job::Build

Inherits:
Object
  • Object
show all
Includes:
Trackable
Defined in:
lib/agile_notifier/ci.rb

Direct Known Subclasses

Jenkins::Job::Build

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Trackable

#failed?, #fixed?, #passed?, #unstable?

Constructor Details

#initialize(number, url) ⇒ Build

Returns a new instance of Build.



42
43
44
45
46
47
# File 'lib/agile_notifier/ci.rb', line 42

def initialize(number, url)
  @number = number
  @url = url
  @result = get_result
  @revision = get_revision
end

Instance Attribute Details

#numberObject

Returns the value of attribute number.



40
41
42
# File 'lib/agile_notifier/ci.rb', line 40

def number
  @number
end

#resultObject

Returns the value of attribute result.



40
41
42
# File 'lib/agile_notifier/ci.rb', line 40

def result
  @result
end

#revisionObject

Returns the value of attribute revision.



40
41
42
# File 'lib/agile_notifier/ci.rb', line 40

def revision
  @revision
end

#urlObject

Returns the value of attribute url.



40
41
42
# File 'lib/agile_notifier/ci.rb', line 40

def url
  @url
end

Instance Method Details

#get_previous_buildObject

Raises:

  • (NotImplementedError)


61
62
63
# File 'lib/agile_notifier/ci.rb', line 61

def get_previous_build
  raise(NotImplementedError, "Abstract method [#{__method__}] is called, please implement", caller)
end

#get_previous_resultObject

Raises:

  • (NotImplementedError)


65
66
67
# File 'lib/agile_notifier/ci.rb', line 65

def get_previous_result
  raise(NotImplementedError, "Abstract method [#{__method__}] is called, please implement", caller)
end

#get_resultObject

Raises:

  • (NotImplementedError)


53
54
55
# File 'lib/agile_notifier/ci.rb', line 53

def get_result
  raise(NotImplementedError, "Abstract method [#{__method__}] is called, please implement", caller)
end

#get_revisionObject

Raises:

  • (NotImplementedError)


57
58
59
# File 'lib/agile_notifier/ci.rb', line 57

def get_revision
  raise(NotImplementedError, "Abstract method [#{__method__}] is called, please implement", caller)
end

#is_building?Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


49
50
51
# File 'lib/agile_notifier/ci.rb', line 49

def is_building?
  raise(NotImplementedError, "Abstract method [#{__method__}] is called, please implement", caller)
end