Sha256: e468823e0a005bbd7e42cdb1afdf93ed35d08f69edd4f38c7735bfcb03e95594

Contents?: true

Size: 355 Bytes

Versions: 4

Compression:

Stored size: 355 Bytes

Contents

module Personify
  class Template
    
    attr_reader :template
    
    def initialize(template)
      parser = PersonifyLanguageParser.new
      @template = parser.parse(template)
    end
    
    def render(local_assigns={}, context = DefaultContext.new)
      context.local_assigns = local_assigns
      @template.eval(context)
    end
    
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
personify-1.1.2 lib/personify/template.rb
personify-1.1.1 lib/personify/template.rb
personify-1.1.0 lib/personify/template.rb
personify-1.0.0 lib/personify/template.rb