Class: SimpleQS::Responce

Inherits:
Object
  • Object
show all
Defined in:
lib/simple_qs/responce.rb,
lib/simple_qs/responce/exceptions.rb,
lib/simple_qs/responce/failure_builder.rb,
lib/simple_qs/responce/successful_builder.rb

Defined Under Namespace

Classes: AWSSimpleQueueServiceInternalError, AWSSimpleQueueServiceNonExistentQueueError, AWSSimpleQueueServiceQueueDeletedRecently, AWSSimpleQueueServiceQueueNameExists, AccessDeniedError, AuthFailureError, ConflictingQueryParameterError, Error, FailureBuilder, InternalError, InvalidAccessKeyIdError, InvalidActionError, InvalidAddressError, InvalidHttpRequestError, InvalidParameterCombinationError, InvalidParameterValueError, InvalidQueryParameterError, InvalidRequestError, InvalidSecurityError, InvalidSecurityTokenError, MalformedVersionError, MissingClientTokenIdError, MissingCredentialsError, MissingParameterError, NoSuchVersionError, NotAuthorizedToUseVersionError, OptInRequiredError, RequestExpiredError, RequestThrottledError, ServiceUnavailableError, SignatureDoesNotMatchError, SuccessfulBuilder, X509ParseError

Instance Method Summary collapse

Constructor Details

#initialize(xml) ⇒ Responce

Returns a new instance of Responce.



11
12
13
# File 'lib/simple_qs/responce.rb', line 11

def initialize(xml)
  _parse xml
end

Instance Method Details

#root_elementObject



19
20
21
# File 'lib/simple_qs/responce.rb', line 19

def root_element
  @xml_data.keys[0]
end

#successful?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/simple_qs/responce.rb', line 15

def successful?
  !@xml_data.key?('ErrorResponse')
end