log

log(level, data) Instance Public methods Same as WEBrick::BasicLog#log

attribute_method?

attribute_method?(attr_name) Instance Protected methods

pluralize

pluralize(count = nil, locale = :en) Instance Public methods Returns the plural form of the word in the string. If the optional parameter count is specified, the singular form will be returned if count == 1. For any other value of count the plural will be returned. If the optional parameter locale is specified, the word will be pluralized as a word of that language. By default, this parameter is set to :en. You must define your own inflection rules for languages other than English.

set_operation

set_operation(op) Class Public methods

add_version_option

add_version_option(task = command, *wrap) Instance Public methods Add the âversion option to the option parser.

set_registry

set_registry(v) Instance Protected methods protected setter for the registry component v see also #registry=

get

get() Instance Public methods

reset_counters

reset_counters(id, *counters) Instance Public methods Resets one or more counter caches to their correct value using an SQL count query. This is useful when adding new counter caches, or if the counter has been corrupted or modified directly by SQL. Parameters id - The id of the object you wish to reset a counter on. counters - One or more association counters to reset Examples # For Post with id #1 records reset the comments_count Post.reset_counters(1, :comments)

object_class

object_class() Instance Public methods Returns the NormalClass âObjectâ, creating it if not found. Records self as a location in âObjectâ.

instrument

instrument(name, payload={}) Instance Public methods Instrument the given block by measuring the time taken to execute it and publish it. Notice that events get sent even if an error occurs in the passed-in block.