Class: TMS::Errors::InvalidVerb
- Inherits:
-
Object
- Object
- TMS::Errors::InvalidVerb
- Defined in:
- lib/tms_client/errors.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#record ⇒ Object
readonly
Returns the value of attribute record.
Instance Method Summary collapse
-
#initialize(record_or_string) ⇒ InvalidVerb
constructor
A new instance of InvalidVerb.
Constructor Details
#initialize(record_or_string) ⇒ InvalidVerb
Returns a new instance of InvalidVerb.
36 37 38 39 40 41 42 43 44 |
# File 'lib/tms_client/errors.rb', line 36 def initialize(record_or_string) if record_or_string.respond_to?(:href) @record = record_or_string super("Couldn't POST #{record.class} to #{record.href}: #{record.errors.join(', ')}") else super(record_or_string) end end |
Instance Attribute Details
#record ⇒ Object (readonly)
Returns the value of attribute record.
34 35 36 |
# File 'lib/tms_client/errors.rb', line 34 def record @record end |