Sha256: 5d17f4aebcf434eed7a0891b206a1ddebe68e724da8930fa9f888ace67786fe1

Contents?: true

Size: 743 Bytes

Versions: 1

Compression:

Stored size: 743 Bytes

Contents

module HoganAssets
  # Change config options in an initializer:
  #
  # HoganAssets::Config.template_extensions = ['mustache']
  #
  # Or in a block:
  #
  # HoganAssets::Config.configure do |config|
  #   config.template_extensions = ['mustache']
  # end

  module Config
    extend self

    def configure
      yield self
    end

    attr_accessor :allow_hamstache

    attr_writer :template_extensions

    def template_extensions
      @template_extensions ||= if haml_available?
                                 ['mustache', 'hamstache']
                               else
                                 ['mustache']
                               end
    end

    def haml_available?
      defined? ::Haml::Engine
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hogan_assets-1.1.0 lib/hogan_assets/config.rb