Sha256: 852623088a1a62651bda2a8a1226c2bd408a5a715e8aee370a3c7d5dfd409b41

Contents?: true

Size: 834 Bytes

Versions: 18

Compression:

Stored size: 834 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 aliases(value)
    builder.cmdlet_setting(:aliases, 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

18 entries across 18 versions & 1 rubygems

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