Sha256: 3cb582ddb7202bdabb4dc31fb73c5ed873e8b4b5368518469dccbcdb267f2cb0

Contents?: true

Size: 781 Bytes

Versions: 30

Compression:

Stored size: 781 Bytes

Contents

# frozen_string_literal: true

module Cmdlet
  # {{cmdlet.category_description}}
  module {{camel cmdlet.category}}
    # {{camel cmdlet.name}}: {{cmdlet.description}}
    class {{camel cmdlet.name}} < Cmdlet::BaseCmdlet
      {{#each cmdlet.usecases}}
      # @example
      #
      #   puts {{camel ./function}}.new.call({{{nice_inputs}}})
      #
      #   {{expected_output}}
      #
      {{/each}}
      #
      {{#each cmdlet.parameters}}
      # @param [{{./param_type}}] {{./name}} - {{./description}}
      {{/each}}
      # @return [String] {{cmdlet.result}}
      def call({{#each cmdlet.parameters}}{{#if ./splat}}{{./splat}}{{/if}}{{./name}}{{#if ./default}} = {{{./default}}}{{/if}}{{#if @last}}{{^}}, {{/if}}{{/each}})
{{{cmdlet.ruby}}}
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

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