Servlet for serving a single file. You probably want to use the FileHandler
servlet instead as it handles directories and fancy indexes.
Example:
server.mount('/my_page.txt', WEBrick::HTTPServlet::DefaultFileHandler, '/path/to/my_page.txt')
This servlet handles If-Modified-Since and Range
requests.
WIN32OLE_EVENT
objects controls OLE event.
WIN32OLE_PARAM
objects represent param information of the OLE method.
WIN32OLE_RECORD
objects represents VT_RECORD OLE variant. Win32OLE returns WIN32OLE_RECORD
object if the result value of invoking OLE methods.
If COM server in VB.NET ComServer project is the following:
Imports System.Runtime.InteropServices Public Class ComClass Public Structure Book <MarshalAs(UnmanagedType.BStr)> _ Public title As String Public cost As Integer End Structure Public Function getBook() As Book Dim book As New Book book.title = "The Ruby Book" book.cost = 20 Return book End Function End Class
then, you can retrieve getBook return value from the following Ruby script:
require 'win32ole' obj = WIN32OLE.new('ComServer.ComClass') book = obj.getBook book.class # => WIN32OLE_RECORD book.title # => "The Ruby Book" book.cost # => 20
WIN32OLE_TYPE
objects represent OLE type libarary information.
WIN32OLE_TYPELIB
objects represent OLE tyblib information.
WIN32OLE_VARIANT
objects represents OLE variant.
Win32OLE converts Ruby object into OLE variant automatically when invoking OLE methods. If OLE method requires the argument which is different from the variant by automatic conversion of Win32OLE, you can convert the specfied variant type by using WIN32OLE_VARIANT
class.
param = WIN32OLE_VARIANT.new(10, WIN32OLE::VARIANT::VT_R4) oleobj.method(param)
WIN32OLE_VARIANT
does not support VT_RECORD variant. Use WIN32OLE_RECORD
class instead of WIN32OLE_VARIANT
if the VT_RECORD variant is needed.
The parent class for all constructed encodings. The value attribute of a Constructive
is always an Array. Attributes are the same as for ASN1Data
, with the addition of tagging.
Most constructed encodings come in the form of a SET or a SEQUENCE. These encodings are represented by one of the two sub-classes of Constructive:
OpenSSL::ASN1::Sequence
Please note that tagged sequences and sets are still parsed as instances of ASN1Data
. Find
further details on tagged values there.
int = OpenSSL::ASN1::Integer.new(1) str = OpenSSL::ASN1::PrintableString.new('abc') sequence = OpenSSL::ASN1::Sequence.new( [ int, str ] )
int = OpenSSL::ASN1::Integer.new(1) str = OpenSSL::ASN1::PrintableString.new('abc') set = OpenSSL::ASN1::Set.new( [ int, str ] )
See Net::HTTPGenericRequest
for attributes and methods.
Switch
that can omit argument.
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>'