Method: Arrow::Template::TimeDeltaDirective#render
- Defined in:
- lib/arrow/template/timedelta.rb
#render(template, scope) ⇒ Object
Render the content and return it as URL-escaped text.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/arrow/template/timedelta.rb', line 40 def render( template, scope ) rawary = super rary = [] # Try our best to skip debugging comments if template._config[:debuggingComments] rary.push( rawary.shift ) if /^<!--.*-->$/ =~ rawary.first end rawary.each do |line| rary << time_delta_string( line.to_i ) end return rary end |