Returns array of ProgID.
Returns ProgID if it exists. If not found, then returns nil.
tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Application') puts tobj.progid # => Excel.Application.9
Returns the type library version.
tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 9.0 Object Library') puts tlib.version #-> "1.3"
Returns a new hash created by using hsh’s values as keys, and the keys as values. If a key with the same value already exists in the hsh, then the last one defined will be used, the earlier value(s) will be discarded.
h = { "n" => 100, "m" => 100, "y" => 300, "d" => 200, "a" => 0 } h.invert #=> {0=>"a", 100=>"m", 200=>"d", 300=>"y"}
Returns true
if the given key is present in hsh.
h = { "a" => 100, "b" => 200 } h.has_key?("a") #=> true h.has_key?("z") #=> false
Note that include?
and member?
do not test member equality using ==
as do other Enumerables.
See also Enumerable#include?
Returns a new hash created by using environment variable names as values and values as names.
Returns true
if there is an environment variable with the given name
.
This method is an alias for http_header
, when HTML5
tag maker is inactive.
NOTE: use http_header
to create HTTP header blocks, this alias is only provided for backwards compatibility.
Using header
with the HTML5
tag maker will create a <header> element.
This method is a convenience for building Unix-like filters for CSV
data. Each row is yielded to the provided block which can alter it as needed. After the block returns, the row is appended to output
altered or not.
The input
and output
arguments can be anything CSV::new()
accepts (generally String or IO
objects). If not given, they default to ARGF
and $stdout
.
The options
parameter is also filtered down to CSV::new()
after some clever key parsing. Any key beginning with :in_
or :input_
will have that leading identifier stripped and will only be used in the options
Hash
for the input
object. Keys starting with :out_
or :output_
affect only output
. All other keys are assigned to both objects.
The :output_row_sep
option
defaults to $INPUT_RECORD_SEPARATOR
($/
).
Returns nil
if headers will not be used, true
if they will but have not yet been read, or the actual headers after they have been read. See CSV::new
for details.
You can use this method to install a CSV::Converters
built-in, or provide a block that handles a custom conversion.
If you provide a block that takes one argument, it will be passed the field and is expected to return the converted value or the field itself. If your block takes two arguments, it will also be passed a CSV::FieldInfo
Struct
, containing details about the field. Again, the block should return a converted field or the field itself.
This method must be overridden by subclasses and should return the object method calls are being delegated to.
Returns the current object method calls are being delegated to.
Returns revision information for the erb.rb module.
Set
the handling of the ordering of options and arguments. A RuntimeError
is raised if option processing has already started.
The supplied value must be a member of GetoptLong::ORDERINGS
. It alters the processing of options as follows:
REQUIRE_ORDER :
Options are required to occur before non-options.
Processing of options ends as soon as a word is encountered that has not been preceded by an appropriate option flag.
For example, if -a and -b are options which do not take arguments, parsing command line arguments of ‘-a one -b two’ would result in ‘one’, ‘-b’, ‘two’ being left in ARGV, and only (‘-a’, ”) being processed as an option/arg pair.
This is the default ordering, if the environment variable POSIXLY_CORRECT is set. (This is for compatibility with GNU getopt_long.)
PERMUTE :
Options can occur anywhere in the command line parsed. This is the default behavior.
Every sequence of words which can be interpreted as an option (with or without argument) is treated as an option; non-option words are skipped.
For example, if -a does not require an argument and -b optionally takes an argument, parsing ‘-a one -b two three’ would result in (‘-a’,”) and (‘-b’, ‘two’) being processed as option/arg pairs, and ‘one’,‘three’ being left in ARGV.
If the ordering is set to PERMUTE but the environment variable POSIXLY_CORRECT is set, REQUIRE_ORDER is used instead. This is for compatibility with GNU getopt_long.
RETURN_IN_ORDER :
All words on the command line are processed as options. Words not preceded by a short or long option flag are passed as arguments with an option of ” (empty string).
For example, if -a requires an argument but -b does not, a command line of ‘-a one -b two three’ would result in option/arg pairs of (‘-a’, ‘one’) (‘-b’, ”), (”, ‘two’), (”, ‘three’) being processed.
Explicitly terminate option processing.
Returns true if option processing has terminated, false otherwise.
Get next option name and its argument, as an Array of two elements.
The option name is always converted to the first (preferred) name given in the original options to GetoptLong.new
.
Example: [‘–option’, ‘value’]
Returns nil if the processing is complete (as determined by STATUS_TERMINATED
).
Returns a string for DNS reverse lookup. It returns a string in RFC3172 form for an IPv6 address.
provides a unified clone
operation, for REXML::XPathParser
to use across multiple Object
types