Sha256: 18b569c4e75ea89ae852e6de757c6bb6a746ac53fd67fa9266f64d618685813e
Contents?: true
Size: 714 Bytes
Versions: 20
Compression:
Stored size: 714 Bytes
Contents
require 'spiderfw/templates/template_blocks' module Spider; module TemplateBlocks class TextDomain < Block def compile(options={}) init = "" td = @el.get_attribute('tpl:text-domain') c = "Spider::GetText.in_domain('#{td}') do\n" @el.remove_attribute('tpl:text-domain') content = Spider::TemplateBlocks.parse_element(@el, @allowed_blocks, @template).compile(options) init += content.init_code content.run_code.each_line do |line| c += ' '+line end c += "end\n" return CompiledBlock.new(init, c) end end end; end
Version data entries
20 entries across 20 versions & 1 rubygems