class Prism::Result

that were encountered.
the requested structure, any comments that were encounters, and any errors
This represents the result of a call to ::parse or ::parse_file. It contains

def deconstruct_keys(keys)

Implement the hash pattern matching interface for Result.
def deconstruct_keys(keys)
  { comments: comments, magic_comments: magic_comments, data_loc: data_loc, errors: errors, warnings: warnings }
end

def encoding

Returns the encoding of the source code that was parsed.
def encoding
  source.encoding
end

def failure?

not.
Returns true if there were errors during parsing and false if there were
def failure?
  !success?
end

def initialize(comments, magic_comments, data_loc, errors, warnings, source)

Create a new result object with the given values.
def initialize(comments, magic_comments, data_loc, errors, warnings, source)
  @comments = comments
  @magic_comments = magic_comments
  @data_loc = data_loc
  @errors = errors
  @warnings = warnings
  @source = source
end

def success?

were.
Returns true if there were no errors during parsing and false if there
def success?
  errors.empty?
end