Class: Hudson::JobInstance

Inherits:
Object
  • Object
show all
Defined in:
lib/api/job_instance.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(jobname, id) ⇒ JobInstance

Returns a new instance of JobInstance.



6
7
8
9
10
11
# File 'lib/api/job_instance.rb', line 6

def initialize(jobname, id)
  @jobname = jobname
  @id = id
  @module_url = "/job/"
  load
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



4
5
6
# File 'lib/api/job_instance.rb', line 4

def id
  @id
end

#jobnameObject (readonly)

Returns the value of attribute jobname.



4
5
6
# File 'lib/api/job_instance.rb', line 4

def jobname
  @jobname
end

#msgObject (readonly)

Returns the value of attribute msg.



4
5
6
# File 'lib/api/job_instance.rb', line 4

def msg
  @msg
end

Instance Method Details

#artifactsObject

return artifacts created in this instance



14
15
16
# File 'lib/api/job_instance.rb', line 14

def artifacts
  f("artifacts")
end

#building?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/api/job_instance.rb', line 22

def building?
  f("building")
end

#changesetObject



18
19
20
# File 'lib/api/job_instance.rb', line 18

def changeset
  f("changeSet")
end

#durationObject



26
27
28
# File 'lib/api/job_instance.rb', line 26

def duration
  f("duration")
end

#numberObject



30
31
32
# File 'lib/api/job_instance.rb', line 30

def number
  f("number")
end

#resultObject



34
35
36
# File 'lib/api/job_instance.rb', line 34

def result
  f("result")
end

#timestampObject



38
39
40
# File 'lib/api/job_instance.rb', line 38

def timestamp
  f("timestamp")
end