Class: Webgen::Tag::Date
- Inherits:
-
Object
- Object
- Webgen::Tag::Date
- 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
-
#call(tag, body, context) ⇒ Object
Return the current date formatted as specified.
Methods included from Base
#create_tag_params, #param, #set_params
Methods included from WebsiteAccess
Methods included from Loggable
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 |