parse

parse(yaml, filename = nil) Class Public methods Parse a YAML string in yaml. Returns the first object of a YAML AST. filename is used in the exception message if a Psych::SyntaxError is raised. Raises a Psych::SyntaxError when a YAML syntax error is detected. Example: Psych.parse("---\n - a\n - b") # => #<Psych::Nodes::Sequence:0x00> begin Psych.parse("--- `", "file.txt") rescue Psych::SyntaxError => ex ex.file # => 'file.txt' ex.message # => "(file.tx

parse_file

parse_file(filename) Class Public methods Parse a file at filename. Returns the YAML AST. Raises a Psych::SyntaxError when a YAML syntax error is detected.

parse_stream

parse_stream(yaml, filename = nil, &block) Class Public methods Parse a YAML string in yaml. Returns the full AST for the YAML document. This method can handle multiple YAML documents contained in yaml. filename is used in the exception message if a Psych::SyntaxError is raised. If a block is given, a Psych::Nodes::Document node will be yielded to the block as it's being parsed. Raises a Psych::SyntaxError when a YAML syntax error is detected. Example: Psych.parse_stream("---\

parser

parser() Class Public methods Returns a default parser

read_type_class

read_type_class(type, reference) Class Public methods

tagurize

tagurize(thing) Class Public methods

to_json

to_json(o) Class Public methods Dump Ruby object o to a JSON string.

status

status() Instance Public methods Returns the exit status of the child for which PTY#check raised this exception

check

PTY.check(pid, raise = false) => Process::Status or nilPTY.check(pid, true) => nil or raises PTY::ChildExited Class Public methods Checks the status of the child process specified by pid. Returns nil if the process is still alive. If the process is not alive, and raise was true, a PTY::ChildExited exception will be raised. Otherwise it will return a Process::Status instance. pid The process id of the process to check raise If true and the process identified b

getpty

PTY.spawn(command_line) { |r, w, pid| ... }PTY.spawn(command_line) => [r, w, pid]PTY.spawn(command, arguments, ...) { |r, w, pid| ... }PTY.spawn(command, arguments, ...) => [r, w, pid] Class Public methods Spawns the specified command on a newly allocated pty. You can also use the alias ::getpty. The command's controlling tty is set to the slave device of the pty and its standard input/output/error is redirected to the slave device. command and command_line are the full