module Pith::Plugins::Publication::TemplateMethods
Public Instance Methods
published?()
click to toggle source
# File lib/pith/plugins/publication/input.rb, line 10 def published? !published_at.nil? end
published_at()
click to toggle source
# File lib/pith/plugins/publication/input.rb, line 14 def published_at parse_timestamp(meta["published"]) end
updated_at()
click to toggle source
# File lib/pith/plugins/publication/input.rb, line 18 def updated_at parse_timestamp(meta["updated"]) || published_at end
Private Instance Methods
parse_timestamp(arg)
click to toggle source
# File lib/pith/plugins/publication/input.rb, line 24 def parse_timestamp(arg) return unless arg return arg.to_time if arg.respond_to?(:to_time) Time.parse(arg.to_s) end