Sha256: 33b9d629aaa87e6e8fd72bc687201054d5cdac20b4e4cf7218f4b6688093d021

Contents?: true

Size: 640 Bytes

Versions: 18

Compression:

Stored size: 640 Bytes

Contents

# frozen_string_literal: true

module Handlebarsjs
  # Pre-configure default helpers for each category
  class HandlebarsConfigurationDefaults
    def add_all_defaults
      {{#each cmdlet_categories}}
      add_{{category}}_defaults
      {{/each}}
    end

    {{#each cmdlet_categories}}
    def add_{{category}}_defaults
      KConfig.configure do |config|
      {{#each cmdlets}}
        config.handlebars.helper(:{{name}}, Handlebarsjs::Helpers::{{camel category}}::{{camel name}}.new{{#if aliases}}, aliases: %i[{{#each aliases}}{{#if @first}}{{^}} {{/if}}{{.}}{{/each}}]{{/if}})
{{/each}}
      end
    end

    {{/each}}
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
cmdlet-0.14.0 .builders/.templates/handlebars_helper_configuration_defaults.rb
cmdlet-0.13.2 .builders/.templates/handlebars_helper_configuration_defaults.rb
cmdlet-0.13.1 .builders/.templates/handlebars_helper_configuration_defaults.rb
cmdlet-0.13.0 .builders/.templates/handlebars_helper_configuration_defaults.rb
cmdlet-0.12.5 .builders/.templates/handlebars_helper_configuration_defaults.rb
cmdlet-0.12.4 .builders/.templates/handlebars_helper_configuration_defaults.rb
cmdlet-0.12.3 .builders/.templates/handlebars_helper_configuration_defaults.rb
cmdlet-0.12.2 .builders/.templates/handlebars_helper_configuration_defaults.rb
cmdlet-0.12.1 .builders/.templates/handlebars_helper_configuration_defaults.rb
cmdlet-0.12.0 .builders/.templates/handlebars_helper_configuration_defaults.rb
cmdlet-0.11.0 .builders/.templates/handlebars_helper_configuration_defaults.rb
cmdlet-0.10.1 .builders/.templates/handlebars_helper_configuration_defaults.rb
cmdlet-0.10.0 .builders/.templates/handlebars_helper_configuration_defaults.rb
cmdlet-0.9.2 .builders/.templates/handlebars_helper_configuration_defaults.rb
cmdlet-0.9.1 .builders/.templates/handlebars_helper_configuration_defaults.rb
cmdlet-0.9.0 .builders/.templates/handlebars_helper_configuration_defaults.rb
cmdlet-0.8.0 .builders/.templates/handlebars_helper_configuration_defaults.rb
cmdlet-0.7.1 .builders/.templates/handlebars_helper_configuration_defaults.rb