Exception: Saxon::ItemType::LexicalStringConversion::Errors::BadRubyValue
- Inherits:
-
ArgumentError
- Object
- ArgumentError
- Saxon::ItemType::LexicalStringConversion::Errors::BadRubyValue
- Defined in:
- lib/saxon/item_type/lexical_string_conversion.rb
Overview
Raised during conversion from Ruby value to XDM Type lexical string when the ruby value does not conform to the Type’s string representation.
Instance Attribute Summary collapse
-
#item_type ⇒ Object
readonly
Returns the value of attribute item_type.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value, item_type) ⇒ BadRubyValue
constructor
A new instance of BadRubyValue.
-
#to_s ⇒ Object
error message includes Ruby value and the XDM type conversion was being attempted to.
Constructor Details
#initialize(value, item_type) ⇒ BadRubyValue
Returns a new instance of BadRubyValue.
503 504 505 |
# File 'lib/saxon/item_type/lexical_string_conversion.rb', line 503 def initialize(value, item_type) @value, @item_type = value, item_type end |
Instance Attribute Details
#item_type ⇒ Object (readonly)
Returns the value of attribute item_type.
501 502 503 |
# File 'lib/saxon/item_type/lexical_string_conversion.rb', line 501 def item_type @item_type end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
501 502 503 |
# File 'lib/saxon/item_type/lexical_string_conversion.rb', line 501 def value @value end |
Instance Method Details
#to_s ⇒ Object
error message includes Ruby value and the XDM type conversion was being attempted to
509 510 511 |
# File 'lib/saxon/item_type/lexical_string_conversion.rb', line 509 def to_s "Ruby value #{value.inspect} cannot be converted to an XDM #{item_type.type_name.to_s}" end |