X7ROOT File Manager
Current Path:
/opt/alt/ruby22/lib64/ruby/2.2.0/psych
opt
/
alt
/
ruby22
/
lib64
/
ruby
/
2.2.0
/
psych
/
??
..
??
class_loader.rb
(1.88 KB)
??
coder.rb
(2.02 KB)
??
core_ext.rb
(751 B)
??
deprecated.rb
(2.49 KB)
??
exception.rb
(234 B)
??
handler.rb
(7.02 KB)
??
handlers
??
json
??
nodes
??
nodes.rb
(2.33 KB)
??
omap.rb
(45 B)
??
parser.rb
(1.64 KB)
??
scalar_scanner.rb
(4.24 KB)
??
set.rb
(44 B)
??
stream.rb
(893 B)
??
streaming.rb
(637 B)
??
syntax_error.rb
(555 B)
??
tree_builder.rb
(2.05 KB)
??
visitors
??
visitors.rb
(206 B)
??
y.rb
(160 B)
Editing: parser.rb
module Psych ### # YAML event parser class. This class parses a YAML document and calls # events on the handler that is passed to the constructor. The events can # be used for things such as constructing a YAML AST or deserializing YAML # documents. It can even be fed back to Psych::Emitter to emit the same # document that was parsed. # # See Psych::Handler for documentation on the events that Psych::Parser emits. # # Here is an example that prints out ever scalar found in a YAML document: # # # Handler for detecting scalar values # class ScalarHandler < Psych::Handler # def scalar value, anchor, tag, plain, quoted, style # puts value # end # end # # parser = Psych::Parser.new(ScalarHandler.new) # parser.parse(yaml_document) # # Here is an example that feeds the parser back in to Psych::Emitter. The # YAML document is read from STDIN and written back out to STDERR: # # parser = Psych::Parser.new(Psych::Emitter.new($stderr)) # parser.parse($stdin) # # Psych uses Psych::Parser in combination with Psych::TreeBuilder to # construct an AST of the parsed YAML document. class Parser class Mark < Struct.new(:index, :line, :column) end # The handler on which events will be called attr_accessor :handler # Set the encoding for this parser to +encoding+ attr_writer :external_encoding ### # Creates a new Psych::Parser instance with +handler+. YAML events will # be called on +handler+. See Psych::Parser for more details. def initialize handler = Handler.new @handler = handler @external_encoding = ANY end end end
Upload File
Create Folder