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)
def deconstruct_keys(keys) { comments: comments, magic_comments: magic_comments, data_loc: data_loc, errors: errors, warnings: warnings } end
def encoding
def encoding source.encoding end
def failure?
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)
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?
Returns true if there were no errors during parsing and false if there
def success? errors.empty? end