Sha256: 19db5fc613f4c93f2a729394a142526134e92e132f01379bec2527513a97f12f

Contents?: true

Size: 662 Bytes

Versions: 1

Compression:

Stored size: 662 Bytes

Contents

# frozen_string_literal: true

module Handlebarsjs
  module Helpers
    # {{cmdlet.category_description}}
    module {{camel cmdlet.category}}
      # {{camel cmdlet.name}}: {{cmdlet.description}}
      class {{camel cmdlet.name}} < Handlebarsjs::BaseHelper
        register_cmdlet(Cmdlet::{{camel cmdlet.category}}::{{camel cmdlet.name}})

        def to_proc
          ->({{#each cmdlet.parameters}}{{#if ./splat}}{{./splat}}{{/if}}{{./name}}{{#if @last}}{{^}}, {{/if}}{{/each}}, _opts) { wrapper(cmdlet.call({{#each cmdlet.parameters}}{{#if ./splat}}{{./splat}}{{/if}}{{./name}}{{#if @last}}{{^}}, {{/if}}{{/each}})) }
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cmdlet-0.3.0 .builders/.templates/handlebars_helper.rb