Class: VSTS::Change
Overview
Change model
Instance Attribute Summary collapse
-
#change_type ⇒ Object
Returns the value of attribute change_type.
-
#item ⇒ Object
Returns the value of attribute item.
Instance Method Summary collapse
-
#get(opts = nil) ⇒ String
Convenience method to directly download a change item (file).
-
#initialize(h = {}) ⇒ Change
constructor
Create new change instance from a hash See https://www.visualstudio.com/en-us/docs/integrate/api/tfvc/changesets#get-list-of-changes-in-a-changeset.
-
#path ⇒ Object
Convenience method to directly access item path.
-
#url ⇒ Object
Convenience method to directly access item url.
-
#version ⇒ Object
Convenience method to directly access item version.
Methods inherited from BaseModel
Constructor Details
#initialize(h = {}) ⇒ Change
Create new change instance from a hash See https://www.visualstudio.com/en-us/docs/integrate/api/tfvc/changesets#get-list-of-changes-in-a-changeset
11 12 13 14 |
# File 'lib/vsts/change.rb', line 11 def initialize(h = {}) @change_type = h["changeType"] @item = Item.new(h["item"]) end |
Instance Attribute Details
#change_type ⇒ Object
Returns the value of attribute change_type.
5 6 7 |
# File 'lib/vsts/change.rb', line 5 def change_type @change_type end |
#item ⇒ Object
Returns the value of attribute item.
5 6 7 |
# File 'lib/vsts/change.rb', line 5 def item @item end |
Instance Method Details
#get(opts = nil) ⇒ String
Convenience method to directly download a change item (file)
35 36 37 38 39 40 41 |
# File 'lib/vsts/change.rb', line 35 def get(opts = nil) if opts.nil? @item.get else @item.get(opts) end end |
#path ⇒ Object
Convenience method to directly access item path
22 23 24 |
# File 'lib/vsts/change.rb', line 22 def path @item.path end |
#url ⇒ Object
Convenience method to directly access item url
27 28 29 |
# File 'lib/vsts/change.rb', line 27 def url @item.url end |
#version ⇒ Object
Convenience method to directly access item version
17 18 19 |
# File 'lib/vsts/change.rb', line 17 def version @item.version end |