class Prismic::Fragments::Timestamp
Attributes
value[RW]
Public Class Methods
new(value)
click to toggle source
# File lib/prismic/fragments/timestamp.rb, line 7 def initialize(value) @value = value end
Public Instance Methods
as_html(link_resolver=nil)
click to toggle source
Generate an HTML representation of the fragment
@param link_resolver [LinkResolver] The LinkResolver
used to build
application's specific URL
@return [String] the HTML representation
# File lib/prismic/fragments/timestamp.rb, line 17 def as_html(link_resolver=nil) %(<time>#{value.iso8601(3)}</time>) end