Sha256: 2a305b72234c243a26f142f509a36f3eb05465ad69bc6fd2e7170d7e156a2620

Contents?: true

Size: 762 Bytes

Versions: 12

Compression:

Stored size: 762 Bytes

Contents

# frozen_string_literal: true

class CmdletChild < KDirector::Directors::ChildDirector
  def initialize(parent, **opts)
    super(parent, **opts)

    builder.add_cmdlet
  end

  def name(value)
    builder.cmdlet_setting(:name, value)
  end

  def description(value)
    builder.cmdlet_setting(:description, value)
  end

  def result(value)
    builder.cmdlet_setting(:result, value)
  end

  def ruby(value)
    builder.cmdlet_setting(:ruby, value)
  end

  def parameter(name, description, splat: nil, default: nil, param_type: 'String')
    builder.add_cmdlet_parameter(
      name,
      description,
      splat: splat,
      default: default,
      param_type: param_type
    )
  end

  def example(value)
    builder.add_cmdlet_example(value)
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
cmdlet-0.7.0 .builders/director/cmdlet_child.rb
cmdlet-0.6.2 .builders/director/cmdlet_child.rb
cmdlet-0.6.1 .builders/director/cmdlet_child.rb
cmdlet-0.6.0 .builders/director/cmdlet_child.rb
cmdlet-0.5.0 .builders/director/cmdlet_child.rb
cmdlet-0.4.2 .builders/director/cmdlet_child.rb
cmdlet-0.4.1 .builders/director/cmdlet_child.rb
cmdlet-0.4.0 .builders/director/cmdlet_child.rb
cmdlet-0.3.0 .builders/director/cmdlet_child.rb
cmdlet-0.2.1 .builders/director/cmdlet_child.rb
cmdlet-0.2.0 .builders/director/cmdlet_child.rb
cmdlet-0.1.2 .builders/director/cmdlet_child.rb