Results for: "module_function"

Return a list of the local variable names defined where this NameError exception was raised.

Internal use only.

The BigDecimal.double_fig class method returns the number of digits a Float number is allowed to have. The result depends upon the CPU and OS in use.

Returns true if the given year is a leap year of the proleptic Gregorian calendar.

Date.gregorian_leap?(1900)        #=> false
Date.gregorian_leap?(2000)        #=> true

Deletes all entries for which the code block returns true. Returns self.

Waits until IO is readable without blocking and returns self, or nil when times out. Returns true immediately when buffered data is available.

Waits until IO is writable without blocking and returns self or nil when times out.

Passes the Integer ordinal of each character in ios, passing the codepoint as an argument. The stream must be opened for reading or an IOError will be raised.

If no block is given, an enumerator is returned instead.

Deletes every key-value pair from gdbm for which block evaluates to true.

Provides marshalling support for use by the Marshal library.

Removes the named field from the object. Returns the value that the field contained if it was defined.

require "ostruct"

person = OpenStruct.new(name: "John", age: 70, pension: 300)

person.delete_field("age")   # => 70
person                       # => #<OpenStruct name="John", pension=300>

Setting the value to nil will not remove the attribute:

person.pension = nil
person                 # => #<OpenStruct name="John", pension=nil>

Iterates over each component of the path.

Pathname.new("/usr/bin/ruby").each_filename {|filename| ... }
  # yields "usr", "bin", and "ruby".

Returns an Enumerator if no block was given.

enum = Pathname.new("/usr/bin/ruby").each_filename
  # ... do stuff ...
enum.each { |e| ... }
  # yields "usr", "bin", and "ruby".

See FileTest.executable_real?.

See FileTest.world_readable?.

See FileTest.readable_real?.

See FileTest.world_writable?.

See FileTest.writable_real?.

This method is called when the parser found syntax error.

Iterates over the key-value pairs in the database, deleting those for which the block returns true.

Returns an Addrinfo object for remote address obtained by getpeername.

Note that addrinfo.protocol is filled by 0.

TCPSocket.open("www.ruby-lang.org", 80) {|s|
  p s.remote_address #=> #<Addrinfo: 221.186.184.68:80 TCP>
}

TCPServer.open("127.0.0.1", 1728) {|serv|
  c = TCPSocket.new("127.0.0.1", 1728)
  s = serv.accept
  p s.remote_address #=> #<Addrinfo: 127.0.0.1:36504 TCP>
}

See IO#each_codepoint.

Invokes Release method of Dispatch interface of WIN32OLE object. You should not use this method because this method exists only for debugging WIN32OLE. The return value is reference counter of OLE object.

invokes Release method of Dispatch interface of WIN32OLE object. Usually, you do not need to call this method because Release method called automatically when WIN32OLE object garbaged.

Calls WIN32OLE#invoke method.

Returns WIN32OLE_TYPE object.

excel = WIN32OLE.new('Excel.Application')
tobj = excel.ole_type

Returns the WIN32OLE_TYPELIB object. The object represents the type library which contains the WIN32OLE object.

excel = WIN32OLE.new('Excel.Application')
tlib = excel.ole_typelib
puts tlib.name  # -> 'Microsoft Excel 9.0 Object Library'
Search took: 6ms  ·  Total Results: 3605