Class: Webgen::Tag::Date

Inherits:
Object
  • Object
show all
Includes:
Base
Defined in:
lib/webgen/tag/date.rb

Overview

Prints out the date using a format string which will be passed to Time#strftime. Therefore you can use everything Time#strftime offers.

Instance Method Summary collapse

Methods included from Base

#create_params_hash, #create_tag_params, #param, #set_params

Methods included from WebsiteAccess

included, website

Methods included from Loggable

#log, #puts

Instance Method Details

#call(tag, body, context) ⇒ Object

Return the current date formatted as specified.



12
13
14
# File 'lib/webgen/tag/date.rb', line 12

def call(tag, body, context)
  Time.now.strftime(param('tag.date.format'))
end