syssign

dsa.syssign(string) â aString Instance Public methods Computes and returns the DSA signature of string, where string is expected to be an already-computed message digest of the original input data. The signature is issued using the private key of this DSA instance. Parameters string is a message digest of the original input data to be signed Example dsa = OpenSSL::PKey::DSA.new(2048) doc = "Sign me" digest = OpenSSL::Digest::SHA1.digest(doc) sig = dsa.syssign(digest)

validate

validate(*args, &block) Instance Public methods Adds a validation method or block to the class. This is useful when overriding the validate instance method becomes too unwieldy and you're looking for more descriptive declaration of your validations. This can be done with a symbol pointing to a method: class Comment include ActiveModel::Validations validate :must_be_friends def must_be_friends errors.add(:base, 'Must be friends to leave a comment') unless commenter.f

define

define(info={}, &block) Class Public methods Eval the given block. All methods available to the current connection adapter are available within the block, so you can easily use the database definition DSL to build up your schema (create_table, add_index, etc.). The info hash is optional, and if given is used to define metadata about the current schema (currently, only the schema's version): ActiveRecord::Schema.define(version: 20380119000001) do ... end

exist?

exist?(slave = '') Class Public methods

show_variable

show_variable(name) Instance Public methods SHOW VARIABLES LIKE 'name'

file_field

file_field(name = "", size = 20, maxlength = nil) Instance Public methods Generate an File Upload Input element as a string. The attributes of the element can be specified as three arguments, name, size, and maxlength. maxlength is the maximum length of the file's name, not of the file's contents. Alternatively, the attributes can be specified as a hash. See multipart_form() for forms that include file uploads. file_field("name") # <INPUT TYPE="file" NAME="name" SIZE="20">

list

list(*args) Instance Public methods Returns an array of file information in the directory (the output is like `ls -l`). If a block is given, it iterates through the listing. ls dir

ungetmouse

ungetmouse(p1) Class Public methods It pushes a KEY_MOUSE event onto the input queue, and associates with that event the given state data and screen-relative character-cell coordinates. The ::ungetmouse function behaves analogously to ::ungetch.

stop 2

stop() Instance Public methods Stop the server

url_for

url_for(options = nil) Instance Public methods Generate a url based on the options provided, default_url_options and the routes defined in routes.rb. The following options are supported: :only_path - If true, the relative url is returned. Defaults to false. :protocol - The protocol to connect to. Defaults to 'http'. :host - Specifies the host the link should be targeted at. If :only_path is false, this option must be provided either explicitly, or via default_url_options. :s