Sha256: bfe49294aeb7856249ad68cc4aec0570082fed642950621f03e970f5173399cf

Contents?: true

Size: 537 Bytes

Versions: 3

Compression:

Stored size: 537 Bytes

Contents

# frozen_string_literal: true

module Handlebarsjs
  # handlebars.handlebars_snapshot.add_helper(helper_name, helper)
  # Structure for storing Cmdlet configuration
  class HandlebarsConfiguration
    include KLog::Logging

    attr_accessor :helpers
    attr_reader :defaults

    def initialize
      @helpers = []
      @defaults = Handlebarsjs::HandlebarsConfigurationDefaults.new
    end

    HelperConfig = Struct.new(:name, :helper)

    def helper(name, helper)
      @helpers << HelperConfig.new(name, helper)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
handlebarsjs-0.6.3 lib/handlebarsjs/handlebars_configuration.rb
handlebarsjs-0.6.2 lib/handlebarsjs/handlebars_configuration.rb
handlebarsjs-0.6.1 lib/handlebarsjs/handlebars_configuration.rb