Class: Date

Inherits:
Object
  • Object
show all
Defined in:
lib/postage/extensions.rb

Instance Method Summary collapse

Instance Method Details

#to_argsObject

Stringify date and split by ‘-’.

date = Date.new(2009,6,9)
date.to_s     # => 2009-06-09
date.to_args  # => [ "2009", "06", "09" ]


33
34
35
# File 'lib/postage/extensions.rb', line 33

def to_args
  to_s.split('-')
end