class TFS::WorkItems
Constants
- InvalidRecord
- REQUIRED_PARAMS
Public Class Methods
find(id)
click to toggle source
Changeset can be found by id alone
TFS::Changeset.find(123)
# File lib/tfs/work_items.rb, line 17 def find(id) TFS.workitems(id).run.first end
save(item)
click to toggle source
# File lib/tfs/work_items.rb, line 21 def save(item) REQUIRED_PARAMS.each do |param| raise InvalidRecord, "Missing required parameter '#{param}'" if item.send(param).nil? end client.AddToWorkItems(item) item = client.save_changes item.first end
update(item)
click to toggle source
# File lib/tfs/work_items.rb, line 31 def update(item) client.update_object(item) client.save_changes end
Private Class Methods
client()
click to toggle source
# File lib/tfs/work_items.rb, line 37 def client @client ||= TFS.client end