calculate

calculate(operation, column_name, options = {}) Instance Public methods This calculates aggregate values in the given column. Methods for count, sum, average, minimum, and maximum have been added as shortcuts. There are two basic forms of output: * Single aggregate value: The single value is type cast to Fixnum for COUNT, Float for AVG, and the given column's type for everything else. * Grouped values: This returns an ordered hash of the values and groups them. It takes either

determine_scale

determine_scale(*args) Class Public methods

some_function

some_function(num) Instance Public methods

vpath

vpath() Instance Public methods

render_file_with_locals

render_file_with_locals() Instance Public methods

accept_verbatim

accept_verbatim(verbatim) Instance Public methods Adds verbatim to the output

addIPAddrMentry

addIPAddrMentry(name=None) Class Public methods

quote_table_name_for_assignment

quote_table_name_for_assignment(table, attr) Instance Public methods

text_field

text_field(object_name, method, options = {}) Instance Public methods Returns an input tag of the âtextâ type tailored for accessing a specified attribute (identified by method) on an object assigned to the template (identified by object). Additional options on the input tag can be passed as a hash with options. These options will be tagged onto the HTML as an HTML element attribute as in the example shown. Examples text_field(:post, :title, size: 20) # => <input type="text"

to_r

str.to_r â rational Instance Public methods Returns a rational which denotes the string form. The parser ignores leading whitespaces and trailing garbage. Any digit sequences can be separated by an underscore. Returns zero for null or garbage string. NOTE: '0.3'.to_r isn't the same as 0.3.to_r. The former is equivalent to '3/10'.to_r, but the latter isn't so. ' 2 '.to_r #=> (2/1) '300/2'.to_r #=> (150/1) '-9.2'.to_r #=> (-46/5) '-9.2e2'.to_r