Sha256: 449022c5353fa4e42b5d0124a0520e0c656a48a9f42c2605a552594fcc5e2416
Contents?: true
Size: 380 Bytes
Versions: 1
Compression:
Stored size: 380 Bytes
Contents
require 'liquid' module Eyemask module Liquid class Indent < ::Liquid::Block def initialize(tag_name, markup, tokens) super @indentation = markup.to_i end def render(context) prefix = " " * @indentation super.gsub(/^/, prefix) end end end end Liquid::Template.register_tag('indent', Eyemask::Liquid::Indent)
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
eyemask-0.1.0 | lib/eyemask/liquid/indent.rb |