[]

dbm[key] â string value or nil Instance Public methods Return a value from the database by locating the key string provided. If the key is not found, returns nil.

open

DBM.open(filename[, mode[, flags]]) â dbmDBM.open(filename[, mode[, flags]]) {|dbm| block} Class Public methods Open a dbm database and yields it if a block is given. See also DBM.new.

new

DBM.new(filename[, mode[, flags]]) â dbm Class Public methods Open a dbm database with the specified name, which can include a directory path. Any file extensions needed will be supplied automatically by the dbm library. For example, Berkeley DB appends '.db', and GNU gdbm uses two physical files with extensions '.dir' and '.pag'. The mode should be an integer, as for Unix chmod. Flags should be one of READER, WRITER, WRCREAT or NEWDB.

xmlschema 2

dt.iso8601([n=0]) â stringdt.xmlschema([n=0]) â string Instance Public methods This method is equivalent to strftime('%FT%T'). The optional argument n is length of fractional seconds. DateTime.parse('2001-02-03T04:05:06.123456789+07:00').iso8601(9) #=> "2001-02-03T04:05:06.123456789+07:00"

to_time

dt.to_time â time Instance Public methods Returns a Time object which denotes self.

to_s

dt.to_s â string Instance Public methods Returns a string in an ISO 8601 format (This method doesn't use the expanded representations). DateTime.new(2001,2,3,4,5,6,'-7').to_s #=> "2001-02-03T04:05:06-07:00"

to_json

to_json(*args) Instance Public methods Stores class name (DateTime) with Julian year y, month m, day d, hour H, minute M, second S, offset of and Day of Calendar Reform sg as JSON string

to_datetime

dt.to_datetime â self Instance Public methods Returns self.

to_date

dt.to_date â date Instance Public methods Returns a Date object which denotes self.

strftime

dt.strftime([format='%FT%T%:z']) â string Instance Public methods Formats date according to the directives in the given format string. The directives begins with a percent (%) character. Any text not listed as a directive will be passed through to the output string. The directive consists of a percent (%) character, zero or more flags, optional minimum field width, optional modifier and a conversion specifier as follows. %<flags><width><modifier><convers