Sha256: 41015fdc57f949495e3736ee4f5edce15d9baa2bb1154da655825a79f4e1a3e5
Contents?: true
Size: 408 Bytes
Versions: 11
Compression:
Stored size: 408 Bytes
Contents
module Handlebars class Partials attr_accessor :partial_missing def initialize @partials = {} end def []=(name, value) @partials[name.to_s] = value end def [](name) if @partials.has_key?(name.to_s) return @partials[name.to_s] elsif @partial_missing return @partial_missing[name] else yield end end end end
Version data entries
11 entries across 11 versions & 1 rubygems