__FILE__ ^^^^^^^^
If this boolean is false, types unsupported by the JSON
format will be serialized as strings. If this boolean is true, types unsupported by the JSON
format will raise a JSON::GeneratorError
.
If this boolean is false, types unsupported by the JSON
format will be serialized as strings. If this boolean is true, types unsupported by the JSON
format will raise a JSON::GeneratorError
.
This sets whether or not to serialize types unsupported by the JSON
format as strings. If this boolean is false, types unsupported by the JSON
format will be serialized as strings. If this boolean is true, types unsupported by the JSON
format will raise a JSON::GeneratorError
.
Returns the cofactor of the group.
See the OpenSSL
documentation for EC_GROUP_get_cofactor()
Whether the critical flag is set on this property.
Is this tar entry a directory?
Returns true for IPv6 multicast node-local scope address. It returns false otherwise.
Displays helpfile. The 1st argument specifies WIN32OLE::Type
object or WIN32OLE::Method
object or helpfile.
excel = WIN32OLE.new('Excel.Application') typeobj = excel.ole_type WIN32OLE.ole_show_help(typeobj)
Returns WIN32OLE
object for a specific dispatch or dual interface specified by iid.
ie = WIN32OLE.new('InternetExplorer.Application') ie_web_app = ie.ole_query_interface('{0002DF05-0000-0000-C000-000000000046}') # => WIN32OLE object for dispinterface IWebBrowserApp
Returns WIN32OLE::Type
object.
excel = WIN32OLE.new('Excel.Application') tobj = excel.ole_type
Render a template on a new toplevel binding with local variables specified by a Hash
object.
Returns the value of the local variable symbol
.
def foo a = 1 binding.local_variable_get(:a) #=> 1 binding.local_variable_get(:b) #=> NameError end
This method is the short version of the following code:
binding.eval("#{symbol}")
Set
local variable named symbol
as obj
.
def foo a = 1 bind = binding bind.local_variable_set(:a, 2) # set existing local variable `a' bind.local_variable_set(:b, 3) # create new local variable `b' # `b' exists only in binding p bind.local_variable_get(:a) #=> 2 p bind.local_variable_get(:b) #=> 3 p a #=> 2 p b #=> NameError end
This method behaves similarly to the following code:
binding.eval("#{symbol} = #{obj}")
if obj
can be dumped in Ruby code.
Returns true
if a local variable symbol
exists.
def foo a = 1 binding.local_variable_defined?(:a) #=> true binding.local_variable_defined?(:b) #=> false end
This method is the short version of the following code:
binding.eval("defined?(#{symbol}) == 'local-variable'")
Breaks the buffer into lines that are shorter than maxwidth
Returns the value of a thread local variable that has been set. Note that these are different than fiber local values. For fiber local values, please see Thread#[]
and Thread#[]=
.
Thread
local values are carried along with threads, and do not respect fibers. For example:
Thread.new { Thread.current.thread_variable_set("foo", "bar") # set a thread local Thread.current["foo"] = "bar" # set a fiber local Fiber.new { Fiber.yield [ Thread.current.thread_variable_get("foo"), # get the thread local Thread.current["foo"], # get the fiber local ] }.resume }.join.value # => ['bar', nil]
The value “bar” is returned for the thread local, where nil is returned for the fiber local. The fiber is executed in the same thread, so the thread local values are available.
Sets a thread local with key
to value
. Note that these are local to threads, and not to fibers. Please see Thread#thread_variable_get
and Thread#[]
for more information.
Safely loads the document contained in filename
. Returns the yaml contained in filename
as a Ruby object, or if the file is empty, it returns the specified fallback
return value, which defaults to false
. See safe_load
for options.