Class: Bamboo::Client::Rest::Change
- Inherits:
-
Object
- Object
- Bamboo::Client::Rest::Change
- Defined in:
- lib/bamboo-client/rest.rb
Overview
Result
Instance Method Summary collapse
- #author ⇒ Object
- #comment ⇒ Object
- #commit_url ⇒ Object
- #date ⇒ Object
- #files ⇒ Object
- #full_name ⇒ Object
- #id ⇒ Object
-
#initialize(data, http) ⇒ Change
constructor
A new instance of Change.
- #user_name ⇒ Object
Constructor Details
#initialize(data, http) ⇒ Change
Returns a new instance of Change.
230 231 232 233 |
# File 'lib/bamboo-client/rest.rb', line 230 def initialize(data, http) @data = data @http = http end |
Instance Method Details
#author ⇒ Object
243 244 245 |
# File 'lib/bamboo-client/rest.rb', line 243 def @data['author'] end |
#comment ⇒ Object
255 256 257 |
# File 'lib/bamboo-client/rest.rb', line 255 def comment @data['comment'] end |
#commit_url ⇒ Object
259 260 261 |
# File 'lib/bamboo-client/rest.rb', line 259 def commit_url @data['commitUrl'] end |
#date ⇒ Object
239 240 241 |
# File 'lib/bamboo-client/rest.rb', line 239 def date Time.parse @data['date'] end |
#files ⇒ Object
263 264 265 266 267 268 269 270 271 |
# File 'lib/bamboo-client/rest.rb', line 263 def files # could use expand here Array(@data.fetch('files')['file']).map do |data| { :name => data['name'], :revision => data['revision'] } end end |
#full_name ⇒ Object
247 248 249 |
# File 'lib/bamboo-client/rest.rb', line 247 def full_name @data['fullName'] end |
#id ⇒ Object
235 236 237 |
# File 'lib/bamboo-client/rest.rb', line 235 def id @data['changesetId'] end |
#user_name ⇒ Object
251 252 253 |
# File 'lib/bamboo-client/rest.rb', line 251 def user_name @data['userName'] end |