Class: Travis::Client::Worker

Inherits:
Entity
  • Object
show all
Includes:
States
Defined in:
lib/travis/client/worker.rb

Constant Summary

Constants included from States

States::STATES

Constants inherited from Entity

Entity::MAP

Instance Attribute Summary collapse

Attributes inherited from Entity

#attributes, #curry, #id, #session

Class Method Summary collapse

Instance Method Summary collapse

Methods included from States

#canceled?, #color, #created?, #errored?, #failed?, #finished?, #green?, #passed?, #pending?, #queued?, #ready?, #red?, #running?, #started?, #unsuccessful?, #yellow?

Methods inherited from Entity

#[], #[]=, aka, #attribute_names, attributes, #complete?, has, #include?, #initialize, #inspect, inspect_info, #load, many, #missing?, one, relations, #relations, #reload, subclass_for, subclasses, time, #update_attributes

Constructor Details

This class inherits a constructor from Travis::Client::Entity

Instance Attribute Details

#hostObject (readonly)

Returns the value of attribute host.



1
2
3
# File 'lib/travis/client/worker.rb', line 1

def host
  @host
end

#nameObject (readonly)

Returns the value of attribute name.



1
2
3
# File 'lib/travis/client/worker.rb', line 1

def name
  @name
end

#payloadObject

Returns the value of attribute payload.



1
2
3
# File 'lib/travis/client/worker.rb', line 1

def payload
  @payload
end

#stateObject (readonly)

Returns the value of attribute state.



1
2
3
# File 'lib/travis/client/worker.rb', line 1

def state
  @state
end

Class Method Details

.cast_id(id) ⇒ Object



8
9
10
# File 'lib/travis/client/worker.rb', line 8

def self.cast_id(id)
  String(id)
end

Instance Method Details

#jobObject



27
28
29
# File 'lib/travis/client/worker.rb', line 27

def job
  payload['job']
end

#repositoryObject



23
24
25
# File 'lib/travis/client/worker.rb', line 23

def repository
  payload['repo']
end