validates_acceptance_of

validates_acceptance_of(*attr_names) Instance Public methods Encapsulates the pattern of wanting to validate the acceptance of a terms of service check box (or similar agreement). class Person < ActiveRecord::Base validates_acceptance_of :terms_of_service validates_acceptance_of :eula, message: 'must be abided' end If the database column does not exist, the terms_of_service attribute is entirely virtual. This check is performed only if terms_of_service is not nil and by def

nodeValue

nodeValue() Instance Public methods VARIANT nodeValue value stored in the node

cleanup!

cleanup!() Class Public methods Execute all cleanup callbacks.

on_stag_end

on_stag_end(name) Instance Public methods

mmult

mmult(rows, cols, m1, m2) Instance Public methods

variable_kind

WIN32OLE_VARIABLE#variable_kind Instance Public methods Returns variable kind string. tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'XlSheetType') variables = tobj.variables variables.each do |variable| puts "#{variable.name} #{variable.variable_kind}" end The result of above script is following: xlChart CONSTANT xlDialogSheet CONSTANT xlExcel4IntlMacroSheet CONSTANT xlExcel4MacroSheet CONSTANT xlWorksheet CONSTANT

add_module

add_module(class_type, name) Instance Public methods Adds a module named name. If RDoc already knows name is a class then that class is returned instead. See also add_class.

unix_server_loop

unix_server_loop(path) Class Public methods creates a UNIX socket server on path. It calls the block for each socket accepted. If host is specified, it is used with port to determine the server ports. The socket is not closed when the block returns. So application should close it. This method deletes the socket file pointed by path at first if the file is a socket file and it is owned by the user of the application. This is safe only if the directory of path is not changed by a mal

udp_server_loop

Socket.udp_server_loop(port) {|msg, msg_src| ... }Socket.udp_server_loop(host, port) {|msg, msg_src| ... } Class Public methods creates a UDP/IP server on port and calls the block for each message arrived. The block is called with the message and its source information. This method allocates sockets internally using port. If host is specified, it is used conjunction with port to determine the server addresses. The msg is a string. The msg_src is a Socket::UDPSource object. It is u

new

new(controller) Class Public methods