Sha256: 761384b5f38d5006bbf28d45b31b30bf1da9f8dcf495186acea969c79473a46d

Contents?: true

Size: 405 Bytes

Versions: 2

Compression:

Stored size: 405 Bytes

Contents

require 'stachio/proxy'

module Stachio
  class Template < ActiveRecord::Base
    lookup_by :template_name

    attr_accessible :template_name, :content
    validates_presence_of :template_name, :content

    attr_accessor :proxied

    def proxy
      @proxy ||= Stachio::Proxy.new(proxied) unless proxied.nil?
    end

    def compose
      proxy.template = content
      proxy.render
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
stachio-0.0.2 app/models/stachio/template.rb
stachio-0.0.1 app/models/stachio/template.rb