ordinal

ordinal() Instance Public methods Ordinal returns the suffix used to denote the position in an ordered sequence such as 1st, 2nd, 3rd, 4th. 1.ordinal # => "st" 2.ordinal # => "nd" 1002.ordinal # => "nd" 1003.ordinal # => "rd" -11.ordinal # => "th" -1001.ordinal # => "st"

ordinalize

ordinalize() Instance Public methods Ordinalize turns a number into an ordinal string used to denote the position in an ordered sequence such as 1st, 2nd, 3rd, 4th. 1.ordinalize # => "1st" 2.ordinalize # => "2nd" 1002.ordinalize # => "1002nd" 1003.ordinalize # => "1003rd" -11.ordinalize # => "-11th" -1001.ordinalize # => "-1001st"

year

year() Instance Public methods Alias for: years

years

years() Instance Public methods Also aliased as: year

breakpoint

breakpoint() Instance Public methods Alias for: debugger

capture

capture(stream) Instance Public methods Captures the given stream and returns it: stream = capture(:stdout) { puts 'notice' } stream # => "notice\n" stream = capture(:stderr) { warn 'error' } stream # => "error\n" even for subprocesses: stream = capture(:stdout) { system('echo notice') } stream # => "notice\n" stream = capture(:stderr) { system('echo error 1>&2') } stream # => "error\n" silence

class_eval

class_eval(*args, &block) Instance Public methods #class_eval on an object acts like singleton_class.class_eval.

debugger

debugger() Instance Public methods Starts a debugging session if the debugger gem has been loaded (call rails server âdebugger to do load it). breakpoint

enable_warnings

enable_warnings() Instance Public methods Sets $VERBOSE to true for the duration of the block and back to its original value afterwards.

quietly

quietly() Instance Public methods Silences both STDOUT and STDERR, even for subprocesses. quietly { system 'bundle install' }