Represents assigning to a class variable using an operator that isn’t ‘=`.
@@target += value ^^^^^^^^^^^^^^^^^
Represents assigning to a constant using an operator that isn’t ‘=`.
Target += value ^^^^^^^^^^^^^^^
Represents writing to a constant path in a context that doesn’t have an explicit value.
Foo::Foo, Bar::Bar = baz ^^^^^^^^ ^^^^^^^^
Represents assigning to a global variable using an operator that isn’t ‘=`.
$target += value ^^^^^^^^^^^^^^^^
Represents assigning to an instance variable using an operator that isn’t ‘=`.
@target += value ^^^^^^^^^^^^^^^^
Represents a keyword rest parameter to a method, block, or lambda definition.
def a(**b) ^^^ end
Represents assigning to a local variable using an operator that isn’t ‘=`.
target += value ^^^^^^^^^^^^^^^
Represents the use of ‘**nil` inside method arguments.
def a(**nil) ^^^^^ end
Represents reading a numbered reference to a capture in the previous match.
$1 ^^
Represents a regular expression literal with no interpolation.
/foo/i ^^^^^^
Represents a required keyword parameter to a method, block, or lambda definition.
def a(b: ) ^^ end
Represents a required parameter to a method, block, or lambda definition.
def a(b) ^ end
Represents a rest parameter to a method, block, or lambda definition.
def a(*b) ^^ end
This represents a location in the source.
A RingServer
allows a Rinda::TupleSpace
to be located via UDP broadcasts. Default service location uses the following steps:
A RingServer
begins listening on the network broadcast UDP address.
A RingFinger
sends a UDP packet containing the DRb
URI
where it will listen for a reply.
The RingServer
receives the UDP packet and connects back to the provided DRb
URI
with the DRb
service.
A RingServer
requires a TupleSpace:
ts = Rinda::TupleSpace.new rs = Rinda::RingServer.new
RingServer
can also listen on multicast addresses for announcements. This allows multiple RingServers to run on the same host. To use network broadcast and multicast:
ts = Rinda::TupleSpace.new rs = Rinda::RingServer.new ts, %w[Socket::INADDR_ANY, 239.0.0.1 ff02::1]
BasicSpecification
is an abstract class which implements some common code used by both Specification and StubSpecification.
The Specification
class contains the information for a gem. Typically defined in a .gemspec file or a Rakefile, and looks like this:
Gem::Specification.new do |s| s.name = 'example' s.version = '0.1.0' s.licenses = ['MIT'] s.summary = "This is an example!" s.description = "Much longer explanation of the example!" s.authors = ["Ruby Coder"] s.email = 'rubycoder@example.com' s.files = ["lib/example.rb"] s.homepage = 'https://rubygems.org/gems/example' s.metadata = { "source_code_uri" => "https://github.com/example/example" } end
Starting in RubyGems 2.0, a Specification
can hold arbitrary metadata. See metadata
for restrictions on the format and size of metadata items you may add to a specification.
Gem::StubSpecification
reads the stub: line from the gemspec. This prevents us having to eval the entire gemspec in order to find out certain information.