Sha256: deb3051e3f5b4e09a9b19bb2d4a4b03292b9a8146dac570529b730db7f4e0465

Contents?: true

Size: 242 Bytes

Versions: 12

Compression:

Stored size: 242 Bytes

Contents

module Troy
  module Helpers
    def h(content)
      CGI.escapeHTML(content)
    end

    def partial(name, locals = {})
      path = site.root.join("partials/_#{name}.erb")
      EmbeddedRuby.new(path.read, locals).render
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
troy-0.0.23 lib/troy/helpers.rb
troy-0.0.22 lib/troy/helpers.rb
troy-0.0.21 lib/troy/helpers.rb
troy-0.0.20 lib/troy/helpers.rb
troy-0.0.19 lib/troy/helpers.rb
troy-0.0.18 lib/troy/helpers.rb
troy-0.0.17 lib/troy/helpers.rb
troy-0.0.16 lib/troy/helpers.rb
troy-0.0.15 lib/troy/helpers.rb
troy-0.0.14 lib/troy/helpers.rb
troy-0.0.13 lib/troy/helpers.rb
troy-0.0.12 lib/troy/helpers.rb