Exception: URITemplate::Unconvertable

Inherits:
StandardError
  • Object
show all
Defined in:
lib/uri_template/utils.rb

Overview

This error will be raised whenever an object could not be converted to a param string.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object) ⇒ Unconvertable

Returns a new instance of Unconvertable.



73
74
75
76
# File 'lib/uri_template/utils.rb', line 73

def initialize(object)
  @object = object
  super("Could not convert the given object (#{Object.instance_method(:inspect).bind(@object).call() rescue '<????>'}) to a param since it doesn't respond to :to_param or :to_s.")
end

Instance Attribute Details

#objectObject (readonly)

Returns the value of attribute object.



71
72
73
# File 'lib/uri_template/utils.rb', line 71

def object
  @object
end