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.
224 225 226 227 |
# File 'lib/bamboo-client/rest.rb', line 224 def initialize(data, http) @data = data @http = http end |
Instance Method Details
#author ⇒ Object
237 238 239 |
# File 'lib/bamboo-client/rest.rb', line 237 def @data['author'] end |
#comment ⇒ Object
249 250 251 |
# File 'lib/bamboo-client/rest.rb', line 249 def comment @data['comment'] end |
#date ⇒ Object
233 234 235 |
# File 'lib/bamboo-client/rest.rb', line 233 def date Time.parse @data['date'] end |
#files ⇒ Object
253 254 255 256 257 258 259 260 261 |
# File 'lib/bamboo-client/rest.rb', line 253 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
241 242 243 |
# File 'lib/bamboo-client/rest.rb', line 241 def full_name @data['fullName'] end |
#id ⇒ Object
229 230 231 |
# File 'lib/bamboo-client/rest.rb', line 229 def id @data['changesetId'] end |
#user_name ⇒ Object
245 246 247 |
# File 'lib/bamboo-client/rest.rb', line 245 def user_name @data['userName'] end |