Sha256: 8bba159bd1800d2ef0044c643c4ca8303d34f9d3689068ed0dd1ce488f82f6e5
Contents?: true
Size: 534 Bytes
Versions: 16
Compression:
Stored size: 534 Bytes
Contents
require 'rubygems' require 'time' module GEPUB class DateMeta < Meta def initialize(name, content, parent, attributes = {}, refiners = {}) if content.is_a? String content = Time.parse(content) end super(name, content, parent, attributes, refiners) end def content=(date) if date.is_a? String date = Time.parse(date) end @content = date end def to_s(_locale = nil) # date type don't have alternate scripts. @content.utc.iso8601 end end end
Version data entries
16 entries across 16 versions & 1 rubygems