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.
20 21 22 23 24 25 26 27 28 |
# File 'lib/tms_client/errors.rb', line 20 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.
18 19 20 |
# File 'lib/tms_client/errors.rb', line 18 def record @record end |