Class: Yandex::Webmaster::Api::Attributes::Types::Date
- Inherits:
-
Base
- Object
- Base
- Yandex::Webmaster::Api::Attributes::Types::Date
show all
- Defined in:
- lib/yandex-webmaster/api/attributes/types/date.rb
Class Method Summary
collapse
Methods inherited from Base
default_reader_aliases, default_writer_aliases
Class Method Details
.typecast(value, options = {}) ⇒ Object
9
10
11
|
# File 'lib/yandex-webmaster/api/attributes/types/date.rb', line 9
def self.typecast(value, options = {})
options[:format].present? ? ::Date.strftime(value, options[:format]) : ::Date.parse(value)
end
|