Module: JSONSchemer::Output

Included in:
Keyword, Schema
Defined in:
lib/json_schemer/output.rb

Constant Summary collapse

FRAGMENT_ENCODE_REGEX =
/[^\w?\/:@\-.~!$&'()*+,;=]/

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#keywordObject (readonly)

Returns the value of attribute keyword.



6
7
8
# File 'lib/json_schemer/output.rb', line 6

def keyword
  @keyword
end

#schemaObject (readonly)

Returns the value of attribute schema.



6
7
8
# File 'lib/json_schemer/output.rb', line 6

def schema
  @schema
end

Instance Method Details

#x_errorObject



8
9
10
11
# File 'lib/json_schemer/output.rb', line 8

def x_error
  return @x_error if defined?(@x_error)
  @x_error = schema.parsed['x-error']&.message(error_key)
end