gem

gem(gem_name, *requirements) Instance Private methods Use #gem to activate a specific version of gem_name. requirements is a list of version requirements that the specified gem must match, most commonly â= example.version.numberâ. See Gem::Requirement for how to specify a version requirement. If you will be activating the latest version of a gem, there is no need to call #gem, Kernel#require will do the right thing for you. #gem returns true if the gem was activated, otherwise fal

reset

reset() Instance Public methods Unloads the association. Returns self. class Person < ActiveRecord::Base has_many :pets end person.pets # fetches pets from the database # => [#<Pet id: 1, name: "Snoop", group: "dogs", person_id: 1>] person.pets # uses the pets cache # => [#<Pet id: 1, name: "Snoop", group: "dogs", person_id: 1>] person.pets.reset # clears the pets cache person.pets # fetches pets from the database # => [#<Pet id: 1, name: "Snoop",

actual_hash_displayof

actual_hash_displayof(fnt, option=nil) Class Public methods

load_tclscript_rsrc

load_tclscript_rsrc(resource_name, file=None) Class Public methods

send

udpsocket.send(mesg, flags, host, port) => numbytes_sentudpsocket.send(mesg, flags, sockaddr_to) => numbytes_sentudpsocket.send(mesg, flags) => numbytes_sent Instance Public methods Sends mesg via udpsocket. flags should be a bitwise OR of Socket::MSG_* constants. u1 = UDPSocket.new u1.bind("127.0.0.1", 4913) u2 = UDPSocket.new u2.send "hi", 0, "127.0.0.1", 4913 mesg, addr = u1.recvfrom(10) u1.send mesg, 0, addr[3], addr[1] p u2.recv(100) #=> "hi"

gem

gem() Instance Public methods Also aliased as: dir

gm

Time.gm(year) â timeTime.gm(year, month) â timeTime.gm(year, month, day) â timeTime.gm(year, month, day, hour) â timeTime.gm(year, month, day, hour, min) â timeTime.gm(year, month, day, hour, min, sec_with_frac) â timeTime.gm(year, month, day, hour, min, sec, usec_with_frac) â timeTime.gm(sec, min, hour, day, month, year, wday, yday, isdst, tz) â time Class Public methods Creates a Time object based on given values, interpreted as UTC (GMT). The year must be specified. Other values

each

rng.each {| i | block } â rngrng.each â an_enumerator Instance Public methods Iterates over the elements of range, passing each in turn to the block. The each method can only be used if the begin object of the range supports the succ method. A TypeError is raised if the object does not have succ method defined (like Float). If no block is given, an enumerator is returned instead. (10..15).each {|n| print n, ' ' } # prints: 10 11 12 13 14 15 (2.5..5).each {|n| prin

peeraddr

ipsocket.peeraddr([reverse_lookup]) => [address_family, port, hostname, numeric_address] Instance Public methods Returns the remote address as an array which contains address_family, port, hostname and numeric_address. It is defined for connection oriented socket such as TCPSocket. If reverse_lookup is true or :hostname, hostname is obtained from numeric_address using reverse lookup. Or if it is false, or :numeric, hostname is same as numeric_address. Or if it is nil or ommitte

each_entry

each_entry() Instance Public methods Iterates over the entries (files and subdirectories) in the directory, yielding a Pathname object for each entry.