Class: CS50::AfterBeforeBlock

Inherits:
Block
  • Object
show all
Defined in:
lib/jekyll-theme-cs50.rb

Instance Method Summary collapse

Methods included from Mixins

#initialize

Instance Method Details

#render(context) ⇒ Object



167
168
169
170
171
172
173
174
175
# File 'lib/jekyll-theme-cs50.rb', line 167

def render(context)
  html = CS50::convert(super)

  # Parse timestamp
  iso8601 = CS50::strptime(@args[0]).iso8601

  # Render HTML
  "<div data-#{@tag_name}='#{iso8601}'>#{html}</div>"
end