class YPS::Position
Position
is a placeholder retaining position information of a parsed object.
Fields:
filename
-
File name of the original YAML file.
line
-
Line number in the original YAML string where a parsed object is started.
column
-
Column number in the original YAML string where a parsed object is started.
Attributes
Accessor for the column number where the parsed object is started.
Accessor for the filename of the orignal YAML file
Accessor for the line number where the parsed object is started.
Public Instance Methods
Source
# File lib/yps/value.rb 43 def ==(other) 44 filename == other.filename && line == other.line && column == other.column 45 end
Equality operator. Check whether or not self and other
point the same position.
Source
# File lib/yps/value.rb 36 def to_s 37 "filename: #{filename || 'unknown'} line #{line} column #{column}" 38 end
Return a string representing the position information.