class EepClient::Response
Constants
- ID
- MESSAGE
- MESSAGES
- OK
- STATUS
Attributes
status[R]
Public Class Methods
mock_clear_ok()
click to toggle source
# File lib/eep_client/response.rb, line 30 def self.mock_clear_ok OkResponse.new({ MESSAGE => 'event cleared', STATUS => 'unclassified', ID => 999 }) end
mock_event_ok()
click to toggle source
# File lib/eep_client/response.rb, line 26 def self.mock_event_ok OkResponse.new({ MESSAGE => 'event received', STATUS => 'unclassified', ID => 999 }) end
new(options = { })
click to toggle source
# File lib/eep_client/response.rb, line 11 def initialize(options = { }) @status = options[STATUS] @message = options[MESSAGE] @id = options[ID] @messages = options[MESSAGES] end
new_instance(data)
click to toggle source
# File lib/eep_client/response.rb, line 18 def self.new_instance(data) if data.has_key? OK OkResponse.new(data[OK]) else ErrorResponse.new(data) end end