cycle

cycle(first_value, *values) Instance Public methods Creates a Cycle object whose to_s method cycles through elements of an array every time it is called. This can be used for example, to alternate classes for table rows. You can use named cycles to allow nesting in loops. Passing a Hash as the last parameter with a :name key will create a named cycle. The default name for a cycle without a :name key is "default". You can manually reset a cycle by calling #reset_cycle and passing th

to_datetime

to_datetime() Instance Public methods Converts a string to a DateTime value. "1-1-2012".to_datetime # => Sun, 01 Jan 2012 00:00:00 +0000 "01/01/2012 23:59:59".to_datetime # => Sun, 01 Jan 2012 23:59:59 +0000 "2012-12-13 12:50".to_datetime # => Thu, 13 Dec 2012 12:50:00 +0000 "12/13/2012".to_datetime # => ArgumentError: invalid date

identical?

identical?() Instance Public methods

config

config() Instance Public methods

from_xml

from_xml(xml, disallowed_types = nil) Class Public methods Returns a Hash containing a collection of pairs when the key is the node name and the value is its content xml = <<-XML <?xml version="1.0" encoding="UTF-8"?> <hash> <foo type="integer">1</foo> <bar type="integer">2</bar> </hash> XML hash = Hash.from_xml(xml) # => {"hash"=>{"foo"=>1, "bar"=>2}} DisallowedType is raised if the XML contains at

on_start_element

on_start_element(name, attrs = {}) Instance Public methods

ha1

ha1(credentials, password) Instance Public methods

all

all(*args, &block) Instance Public methods Alias for: any

endpoint

endpoint(endpoint = nil) Class Public methods

template

template(source, *args, &block) Instance Public methods