sysconfdir

sysconfdir() Class Public methods Returns system configuration directory. This is typically â/etcâ, but is modified by the prefix used when Ruby was compiled. For example, if Ruby is built and installed in /usr/local, returns â/usr/local/etcâ.

add_flash_types

add_flash_types(*types) Instance Public methods Creates new flash types. You can pass as many types as you want to create flash types other than the default alert and notice in your controllers and views. For instance: # in application_controller.rb class ApplicationController < ActionController::Base add_flash_types :warning end # in your controller redirect_to user_path(@user), warning: "Incomplete profile" # in your view <%= warning %> This method will automatically

escape

escape(str) Instance Public methods Escapes HTTP reserved and unwise characters in str

numerator

cmp.numerator â numeric Instance Public methods Returns the numerator. 1 2 3+4i <- numerator - + -i -> ---- 2 3 6 <- denominator c = Complex('1/2+2/3i') #=> ((1/2)+(2/3)*i) n = c.numerator #=> (3+4i) d = c.denominator #=> 6 n / d #=> ((1/2)+(2/3)*i) Complex(Rational(n.real, d), Rational(n.imag, d)) #=> ((1/2)+(2/3)*i) See denominator.

to_eval 2

to_eval() Instance Public methods

hexdigest

digest_obj.hexdigest â stringdigest_obj.hexdigest(string) â string Instance Public methods If none is given, returns the resulting hash value of the digest in a hex-encoded form, keeping the digest's state. If a string is given, returns the hash value for the given string in a hex-encoded form, resetting the digest to the initial state before and after the process.

add

add(tuple) Instance Public methods

new

new() Class Public methods

block_scanf

block_scanf(fstr) Instance Public methods Scans the current string until the match is exhausted yielding each match as it is encountered in the string. A block is not necessary as the results will simply be aggregated into the final array. "123 456".block_scanf("%d") # => [123, 456] If a block is given, the value from that is returned from the yield is added to an output array. "123 456".block_scanf("%d) do |digit,| # the ',' unpacks the Array digit + 100 end # => [223, 55

show_now

show_now() Instance Public methods