Represents a specification retrieved via the rubygems.org API.
This is used to avoid loading the full Specification object when all we need is the name, version, and dependencies.
A GitSpecification
represents a gem that is sourced from a git repository and is being loaded through a gem dependencies file through the git:
option.
Represents a possible Specification object returned from IndexSet. Used to delay needed to download full Specification objects when only the name
and version
are needed.
A LocalSpecification
comes from a .gem file on the local filesystem.
The LockSpecification
comes from a lockfile (Gem::RequestSet::Lockfile
).
A LockSpecification’s dependency information is pre-filled from the lockfile.
The Resolver::SpecSpecification contains common functionality for Resolver specifications that are backed by a Gem::Specification
.
A Resolver::Specification contains a subset of the information contained in a Gem::Specification
. Only the information necessary for dependency resolution in the resolver is included.
A VendorSpecification
represents a gem that has been unpacked into a project and is being loaded through a gem dependencies file through the path:
option.
Gem::Security
default exception type
An object representation of a stack frame, initialized by Kernel#caller_locations
.
For example:
# caller_locations.rb def a(skip) caller_locations(skip) end def b(skip) a(skip) end def c(skip) b(skip) end c(0..2).map do |call| puts call.to_s end
Running ruby caller_locations.rb
will produce:
caller_locations.rb:2:in `a' caller_locations.rb:5:in `b' caller_locations.rb:8:in `c'
Here’s another example with a slightly different result:
# foo.rb class Foo attr_accessor :locations def initialize(skip) @locations = caller_locations(skip) end end Foo.new(0..2).locations.map do |call| puts call.to_s end
Now run ruby foo.rb
and you should see:
init.rb:4:in `initialize' init.rb:8:in `new' init.rb:8:in `<main>'
standard dynamic load exception
The Fiddle::Handle
is the manner to access the dynamic library
libc_so = "/lib64/libc.so.6" => "/lib64/libc.so.6" @handle = Fiddle::Handle.new(libc_so) => #<Fiddle::Handle:0x00000000d69ef8>
libc_so = "/lib64/libc.so.6" => "/lib64/libc.so.6" @handle = Fiddle::Handle.new(libc_so, Fiddle::RTLD_LAZY | Fiddle::RTLD_GLOBAL) => #<Fiddle::Handle:0x00000000d69ef8>
See RTLD_LAZY
and RTLD_GLOBAL
strcpy_addr = @handle['strcpy'] => 140062278451968
or
strcpy_addr = @handle.sym('strcpy') => 140062278451968
Used internally by Fiddle::Importer
Generic error, common for all classes under OpenSSL
module
If an object defines encode_with
, then an instance of Psych::Coder
will be passed to the method when the object is being serialized. The Coder
automatically assumes a Psych::Nodes::Mapping
is being emitted. Other objects like Sequence and Scalar may be emitted if seq=
or scalar=
are called, respectively.
Psych::Handler
is an abstract base class that defines the events used when dealing with Psych::Parser
. Clients who want to use Psych::Parser
should implement a class that inherits from Psych::Handler
and define events that they can handle.
Psych::Handler
defines all events that Psych::Parser
can possibly send to event handlers.
See Psych::Parser
for more details
Zlib::GzipFile
is an abstract class for handling a gzip formatted compressed file. The operations are defined in the subclasses, Zlib::GzipReader
for reading, and Zlib::GzipWriter
for writing.
GzipReader
should be used by associating an IO
, or IO-like, object.
Method
Catalogue ::open (Zlib::GzipReader::open
and Zlib::GzipWriter::open
)
comment= (Zlib::GzipWriter#comment=
)
eof? (Zlib::GzipReader#eof?
)
lineno (Zlib::GzipReader#lineno
)
lineno= (Zlib::GzipReader#lineno=
)
mtime= (Zlib::GzipWriter#mtime=
)
path (when the underlying IO
supports path)
(due to internal structure, documentation may appear under Zlib::GzipReader
or Zlib::GzipWriter
)
exception to wait for reading by EAGAIN. see IO.select
.
exception to wait for writing by EAGAIN. see IO.select
.
exception to wait for reading by EINPROGRESS. see IO.select
.
exception to wait for writing by EINPROGRESS. see IO.select
.
A CSV::Table instance represents CSV data. (see class CSV).
The instance may have:
Rows: each is a Table::Row object.
Headers: names for the columns.
CSV::Table has three groups of instance methods:
Its own internally defined instance methods.
Methods included by module Enumerable
.
Methods delegated to class Array
.:
Commonly, a new CSV::Table instance is created by parsing CSV source using headers:
source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" table = CSV.parse(source, headers: true) table.class # => CSV::Table
You can also create an instance directly. See ::new
.
If a table has headers, the headers serve as labels for the columns of data. Each header serves as the label for its column.
The headers for a CSV::Table object are stored as an Array of Strings.
Commonly, headers are defined in the first row of CSV source:
source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" table = CSV.parse(source, headers: true) table.headers # => ["Name", "Value"]
If no headers are defined, the Array is empty:
table = CSV::Table.new([]) table.headers # => []
CSV::Table provides three modes for accessing table data:
Row mode.
Column mode.
Mixed mode (the default for a new table).
The access mode for aCSV::Table instance affects the behavior of some of its instance methods:
Set
a table to row mode with method by_row!
:
source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" table = CSV.parse(source, headers: true) table.by_row! # => #<CSV::Table mode:row row_count:4>
Specify a single row by an Integer index:
# Get a row. table[1] # => #<CSV::Row "Name":"bar" "Value":"1"> # Set a row, then get it. table[1] = CSV::Row.new(['Name', 'Value'], ['bam', 3]) table[1] # => #<CSV::Row "Name":"bam" "Value":3>
Specify a sequence of rows by a Range:
# Get rows. table[1..2] # => [#<CSV::Row "Name":"bam" "Value":3>, #<CSV::Row "Name":"baz" "Value":"2">] # Set rows, then get them. table[1..2] = [ CSV::Row.new(['Name', 'Value'], ['bat', 4]), CSV::Row.new(['Name', 'Value'], ['bad', 5]), ] table[1..2] # => [["Name", #<CSV::Row "Name":"bat" "Value":4>], ["Value", #<CSV::Row "Name":"bad" "Value":5>]]
Set
a table to column mode with method by_col!
:
source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" table = CSV.parse(source, headers: true) table.by_col! # => #<CSV::Table mode:col row_count:4>
Specify a column by an Integer index:
# Get a column. table[0] # Set a column, then get it. table[0] = ['FOO', 'BAR', 'BAZ'] table[0] # => ["FOO", "BAR", "BAZ"]
Specify a column by its String header:
# Get a column. table['Name'] # => ["FOO", "BAR", "BAZ"] # Set a column, then get it. table['Name'] = ['Foo', 'Bar', 'Baz'] table['Name'] # => ["Foo", "Bar", "Baz"]
In mixed mode, you can refer to either rows or columns:
An Integer index refers to a row.
A Range index refers to multiple rows.
A String index refers to a column.
Set
a table to mixed mode with method by_col_or_row!
:
source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" table = CSV.parse(source, headers: true) table.by_col_or_row! # => #<CSV::Table mode:col_or_row row_count:4>
Specify a single row by an Integer index:
# Get a row. table[1] # => #<CSV::Row "Name":"bar" "Value":"1"> # Set a row, then get it. table[1] = CSV::Row.new(['Name', 'Value'], ['bam', 3]) table[1] # => #<CSV::Row "Name":"bam" "Value":3>
Specify a sequence of rows by a Range:
# Get rows. table[1..2] # => [#<CSV::Row "Name":"bam" "Value":3>, #<CSV::Row "Name":"baz" "Value":"2">] # Set rows, then get them. table[1] = CSV::Row.new(['Name', 'Value'], ['bat', 4]) table[2] = CSV::Row.new(['Name', 'Value'], ['bad', 5]) table[1..2] # => [["Name", #<CSV::Row "Name":"bat" "Value":4>], ["Value", #<CSV::Row "Name":"bad" "Value":5>]]
Specify a column by its String header:
# Get a column. table['Name'] # => ["foo", "bat", "bad"] # Set a column, then get it. table['Name'] = ['Foo', 'Bar', 'Baz'] table['Name'] # => ["Foo", "Bar", "Baz"]