Class: HyperCast::Fault

Inherits:
Data
  • Object
show all
Defined in:
lib/hypercast.rb

Overview

The failure case: a closed reason Symbol (:empty, :malformed, :out_of_range) plus the offending span as byte offsets into the UTF-8 input. Nothing is captured — slicing the offending text out of the input is the caller's choice.

Instance Attribute Summary collapse

Instance Attribute Details

#lengthObject (readonly)

Returns the value of attribute length

Returns:

  • (Object)

    the current value of length



34
35
36
# File 'lib/hypercast.rb', line 34

def length
  @length
end

#offsetObject (readonly)

Returns the value of attribute offset

Returns:

  • (Object)

    the current value of offset



34
35
36
# File 'lib/hypercast.rb', line 34

def offset
  @offset
end

#reasonObject (readonly)

Returns the value of attribute reason

Returns:

  • (Object)

    the current value of reason



34
35
36
# File 'lib/hypercast.rb', line 34

def reason
  @reason
end