strptime

Date.strptime([string='-4712-01-01'[, format='%F'[, start=ITALY]]]) â date Class Public methods Parses the given representation of date and time with the given template, and creates a date object. strptime does not support specification of flags and width unlike strftime. Date.strptime('2001-02-03', '%Y-%m-%d') #=> #<Date: 2001-02-03 ...> Date.strptime('03-02-2001', '%d-%m-%Y') #=> #<Date: 2001-02-03 ...> Date.strptime('2001-034', '%Y-%j') #=> #&

supports_index_sort_order?

supports_index_sort_order?() Instance Public methods

get_one_gem_name

get_one_gem_name() Instance Public methods Get a single gem name from the command line. Fail if there is no gem name or if there is more than one gem name given.

quo

rat.quo(numeric) â numeric Instance Public methods Performs division. Rational(2, 3) / Rational(2, 3) #=> (1/1) Rational(900) / Rational(1) #=> (900/1) Rational(-2, 9) / Rational(-9, 2) #=> (4/81) Rational(9, 8) / 4 #=> (9/32) Rational(20, 9) / 9.8 #=> 0.22675736961451246

document

document(generator, options, destination) Instance Public methods Generates documentation using the named generator (âdarkfishâ or âriâ) and following the given options. Documentation will be generated into destination

validates_presence_of

validates_presence_of(*attr_names) Instance Public methods Validates that the specified attributes are not blank (as defined by Object#blank?), and, if the attribute is an association, that the associated object is not marked for destruction. Happens by default on save. class Person < ActiveRecord::Base has_one :face validates_presence_of :face end The face attribute must be in the object and it cannot be blank or marked for destruction. If you want to validate the presence

read_entries

read_entries(file, f_enc=nil) Class Public methods

decode_www_form

decode_www_form(str, enc=Encoding::UTF_8) Class Public methods Decode URL-encoded form data from given str. This decodes application/x-www-form-urlencoded data and returns array of key-value array. This internally uses ::decode_www_form_component. charset hack is not supported now because the mapping from given charset to Ruby's encoding is not clear yet. see also www.w3.org/TR/html5/syntax.html#character-encodings-0 This refers www.w3.org/TR/html5/forms.html#url-encoded-form-data

mutex

mutex() Instance Public methods

find_attr_comment

find_attr_comment(var_name, attr_name, read = nil, write = nil) Instance Public methods Finds a comment for rb_define_attr, rb_attr or Document-attr. var_name is the C class variable the attribute is defined on. attr_name is the attribute's name. read and write are the read/write flags ('1' or '0'). Either both or neither must be provided.