Class: ITunes::Store::Transporter::TransporterMessage
- Inherits:
-
Object
- Object
- ITunes::Store::Transporter::TransporterMessage
- Defined in:
- lib/itunes/store/transporter/errors.rb
Instance Attribute Summary (collapse)
-
- (Object) code
readonly
Returns the value of attribute code.
-
- (Object) message
readonly
Returns the value of attribute message.
Instance Method Summary (collapse)
- - (Boolean) asset_error?
-
- (Boolean) bad_data?
1000...2000?.
-
- (TransporterMessage) initialize(message, code = nil)
constructor
A new instance of TransporterMessage.
- - (Boolean) invalid_data?
- - (Boolean) missing_data?
- - (Boolean) schema_error?
- - (Object) to_s
- - (Boolean) unsupported_feature?
- - (Boolean) validation_error?
Constructor Details
- (TransporterMessage) initialize(message, code = nil)
A new instance of TransporterMessage
24 25 26 27 |
# File 'lib/itunes/store/transporter/errors.rb', line 24 def initialize(, code = nil) @message = @code = code end |
Instance Attribute Details
- (Object) code (readonly)
Returns the value of attribute code
21 22 23 |
# File 'lib/itunes/store/transporter/errors.rb', line 21 def code @code end |
- (Object) message (readonly)
Returns the value of attribute message
22 23 24 |
# File 'lib/itunes/store/transporter/errors.rb', line 22 def @message end |
Instance Method Details
- (Boolean) asset_error?
51 52 53 |
# File 'lib/itunes/store/transporter/errors.rb', line 51 def asset_error? (9000...10_000).include?(code) end |
- (Boolean) bad_data?
1000...2000?
31 32 33 |
# File 'lib/itunes/store/transporter/errors.rb', line 31 def bad_data? (3000...4000).include?(code) end |
- (Boolean) invalid_data?
35 36 37 |
# File 'lib/itunes/store/transporter/errors.rb', line 35 def invalid_data? (4000...5000).include?(code) end |
- (Boolean) missing_data?
39 40 41 |
# File 'lib/itunes/store/transporter/errors.rb', line 39 def missing_data? (5000...6000).include?(code) end |
- (Boolean) schema_error?
47 48 49 |
# File 'lib/itunes/store/transporter/errors.rb', line 47 def schema_error? (8000...9000).include?(code) end |
- (Object) to_s
59 60 61 62 63 |
# File 'lib/itunes/store/transporter/errors.rb', line 59 def to_s s = .dup s << " (#{code})" if code s end |
- (Boolean) unsupported_feature?
43 44 45 |
# File 'lib/itunes/store/transporter/errors.rb', line 43 def unsupported_feature? (6000...7000).include?(code) end |
- (Boolean) validation_error?
55 56 57 |
# File 'lib/itunes/store/transporter/errors.rb', line 55 def validation_error? (3000...10_000).include?(code) end |