Sha256: 68b319ca5299ab15e642e0bceb1bfc0099712665c0cea7b1795c383ffccb198c

Contents?: true

Size: 526 Bytes

Versions: 40

Compression:

Stored size: 526 Bytes

Contents

module HammerCLIForeman
  module OptionSources
    class FieldsParams < HammerCLI::Options::Sources::Base
      def initialize(command)
        @command = command
      end

      def process(defined_options, result)
        get_options(defined_options, result)
      end

      def get_options(_defined_options, result)
        if @command.respond_to?(:option_fields) && @command.option_fields == ['THIN']
          result[HammerCLI.option_accessor_name('thin')] = true
        end
        result
      end
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
hammer_cli_foreman-3.13.0 lib/hammer_cli_foreman/option_sources/fields_params.rb
hammer_cli_foreman-3.12.0 lib/hammer_cli_foreman/option_sources/fields_params.rb
hammer_cli_foreman-3.10.0 lib/hammer_cli_foreman/option_sources/fields_params.rb
hammer_cli_foreman-3.9.0 lib/hammer_cli_foreman/option_sources/fields_params.rb
hammer_cli_foreman-3.8.0 lib/hammer_cli_foreman/option_sources/fields_params.rb
hammer_cli_foreman-3.7.0 lib/hammer_cli_foreman/option_sources/fields_params.rb
hammer_cli_foreman-3.5.1 lib/hammer_cli_foreman/option_sources/fields_params.rb
hammer_cli_foreman-3.6.0 lib/hammer_cli_foreman/option_sources/fields_params.rb
hammer_cli_foreman-3.5.0 lib/hammer_cli_foreman/option_sources/fields_params.rb
hammer_cli_foreman-3.4.0 lib/hammer_cli_foreman/option_sources/fields_params.rb
hammer_cli_foreman-3.3.0 lib/hammer_cli_foreman/option_sources/fields_params.rb
hammer_cli_foreman-3.2.0 lib/hammer_cli_foreman/option_sources/fields_params.rb
hammer_cli_foreman-2.5.2 lib/hammer_cli_foreman/option_sources/fields_params.rb
hammer_cli_foreman-3.1.0 lib/hammer_cli_foreman/option_sources/fields_params.rb
hammer_cli_foreman-3.0.0 lib/hammer_cli_foreman/option_sources/fields_params.rb
hammer_cli_foreman-2.5.1 lib/hammer_cli_foreman/option_sources/fields_params.rb
hammer_cli_foreman-2.5.0 lib/hammer_cli_foreman/option_sources/fields_params.rb
hammer_cli_foreman-2.3.2 lib/hammer_cli_foreman/option_sources/fields_params.rb
hammer_cli_foreman-2.4.0 lib/hammer_cli_foreman/option_sources/fields_params.rb
hammer_cli_foreman-2.3.1 lib/hammer_cli_foreman/option_sources/fields_params.rb