Class: Foraneus::Converters::Date
- Defined in:
- lib/foraneus/converters/date.rb
Constant Summary collapse
- DEFAULT_FORMAT =
'%Y-%m-%d'
Instance Attribute Summary collapse
-
#opts ⇒ Object
readonly
Returns the value of attribute opts.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Date
constructor
A new instance of Date.
- #parse(s) ⇒ Date
- #raw(v) ⇒ Object
Constructor Details
#initialize(opts = {}) ⇒ Date
Returns a new instance of Date.
14 15 16 17 |
# File 'lib/foraneus/converters/date.rb', line 14 def initialize(opts = {}) @opts = opts @format = opts[:format] || DEFAULT_FORMAT end |
Instance Attribute Details
#opts ⇒ Object (readonly)
Returns the value of attribute opts.
10 11 12 |
# File 'lib/foraneus/converters/date.rb', line 10 def opts @opts end |