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
- #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.
219 220 221 222 |
# File 'lib/bamboo-client/rest.rb', line 219 def initialize(data, http) @data = data @http = http end |
Instance Method Details
#author ⇒ Object
232 233 234 |
# File 'lib/bamboo-client/rest.rb', line 232 def @data['author'] end |
#comment ⇒ Object
244 245 246 |
# File 'lib/bamboo-client/rest.rb', line 244 def comment @data['comment'] end |
#date ⇒ Object
228 229 230 |
# File 'lib/bamboo-client/rest.rb', line 228 def date Time.parse @data['date'] end |
#files ⇒ Object
248 249 250 251 252 253 254 255 256 |
# File 'lib/bamboo-client/rest.rb', line 248 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
236 237 238 |
# File 'lib/bamboo-client/rest.rb', line 236 def full_name @data['fullName'] end |
#id ⇒ Object
224 225 226 |
# File 'lib/bamboo-client/rest.rb', line 224 def id @data['changesetId'] end |
#user_name ⇒ Object
240 241 242 |
# File 'lib/bamboo-client/rest.rb', line 240 def user_name @data['userName'] end |