Exception: TrailerVote::Api::EncodeError
- Defined in:
- lib/trailer_vote/api/errors.rb
Instance Attribute Summary collapse
-
#source ⇒ Object
Returns the value of attribute source.
Instance Method Summary collapse
-
#initialize(media_type:, source:) ⇒ EncodeError
constructor
A new instance of EncodeError.
Constructor Details
#initialize(media_type:, source:) ⇒ EncodeError
Returns a new instance of EncodeError.
15 16 17 18 19 20 21 22 23 |
# File 'lib/trailer_vote/api/errors.rb', line 15 def initialize(media_type:, source:) super format( 'Failed to encode data for %<media_type>s. Reason: %<reason>s', media_type: media_type, reason: source. ) self.source = source end |
Instance Attribute Details
#source ⇒ Object
Returns the value of attribute source.
25 26 27 |
# File 'lib/trailer_vote/api/errors.rb', line 25 def source @source end |