Class: WssAgent::ResponseInventory
- Defined in:
- lib/wss_agent/response_inventory.rb
Constant Summary
Constants inherited from Response
WssAgent::Response::BAD_REQUEST_STATUS, WssAgent::Response::SERVER_ERROR_STATUS, WssAgent::Response::SUCCESS_STATUS
Instance Attribute Summary
Attributes inherited from Response
#data, #response, #response_data, #status
Instance Method Summary collapse
Methods inherited from Response
#initialize, #parse_error, #parse_response, #response_success?, #success?
Constructor Details
This class inherits a constructor from WssAgent::Response
Instance Method Details
#message ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/wss_agent/response_inventory.rb', line 3 def if success? = "White Source update results: \n" << " White Source organization: #{data['organization']} \n" if data['createdProjects'].empty? << " No new projects found \n" else << " #{data['createdProjects'].size} newly created projects: " << data['createdProjects'].join(' ') end if data['updatedProjects'].empty? << "\n No projects were updated \n" else << " #{data['updatedProjects'].size} existing projects were updated: " << data['updatedProjects'].join(' ') end else super end end |