Results for: "String#[]"

No documentation available

YAMLTree builds a YAML ast given a Ruby object. For example:

builder = Psych::Visitors::YAMLTree.new
builder << { :foo => 'bar' }
builder.tree # => #<Psych::Nodes::Stream .. }
No documentation available

Predefined Keys

Raised when the data length recorded in the gzip file footer is not equivalent to the length of the actual uncompressed data.

Raised if you try to access a buffer slice which no longer references a valid memory range of the underlying source.

Class for representing HTTP method POST:

require 'net/http'
uri = URI('http://example.com')
hostname = uri.hostname # => "example.com"
uri.path = '/posts'
req = Net::HTTP::Post.new(uri) # => #<Net::HTTP::Post POST>
req.body = '{"title": "foo","body": "bar","userId": 1}'
req.content_type = 'application/json'
res = Net::HTTP.start(hostname) do |http|
  http.request(req)
end

See Request Headers.

Properties:

Related:

Class for representing HTTP method TRACE:

require 'net/http'
uri = URI('http://example.com')
hostname = uri.hostname # => "example.com"
req = Net::HTTP::Trace.new(uri) # => #<Net::HTTP::Trace TRACE>
res = Net::HTTP.start(hostname) do |http|
  http.request(req)
end

See Request Headers.

Properties:

Related:

Class for representing WebDAV method PROPFIND:

require 'net/http'
uri = URI('http://example.com')
hostname = uri.hostname # => "example.com"
req = Net::HTTP::Propfind.new(uri) # => #<Net::HTTP::Propfind PROPFIND>
res = Net::HTTP.start(hostname) do |http|
  http.request(req)
end

See Request Headers.

Related:

Tokens where state should be ignored used for :on_comment, :on_heredoc_end, :on_embexpr_end

Ignored newlines can occasionally have a LABEL state attached to them, so we compare the state differently here.

The :line tracepoint event gets fired whenever the Ruby VM encounters an expression on a new line. The types of expressions that can trigger this event are:

In order to keep track of the newlines, we have a list of offsets that come back from the parser. We assign these offsets to the first nodes that we find in the tree that are on those lines.

Note that the logic in this file should be kept in sync with the Java MarkNewlinesVisitor, since that visitor is responsible for marking the newlines for JRuby/TruffleRuby.

This file is autoloaded only when mark_newlines! is called, so the re-opening of the various nodes in this file will only be performed in that case. We do that to avoid storing the extra @newline instance variable on every node if we don’t need it.

An entry in a repository that will lazily reify its values when they are first accessed.

A field representing the start and end lines.

This class provides a compatibility layer between prism and Ripper. It functions by parsing the entire tree first and then walking it and executing each of the Ripper callbacks as it goes. To use this class, you treat Prism::Translation::Ripper effectively as you would treat the Ripper class.

Note that this class will serve the most common use cases, but Ripper’s API is extensive and undocumented. It relies on reporting the state of the parser at any given time. We do our best to replicate that here, but because it is a different architecture it is not possible to perfectly replicate the behavior of Ripper.

The main known difference is that we may omit dispatching some events in some cases. This impacts the following events:

No documentation available
No documentation available
No documentation available

Searches for gems starting with the supplied argument.

No documentation available
No documentation available
No documentation available
No documentation available
No documentation available

IO wrapper that creates digests of contents written to the IO it wraps.

Search took: 6ms  ·  Total Results: 2675