Sha256: 688811b5ef4a8f632125416a4c577c33871227e44849c123995f69d0f1a1c8f6

Contents?: true

Size: 1.12 KB

Versions: 62

Compression:

Stored size: 1.12 KB

Contents

require "idlc-sdk-pfm/command/generator_commands"

module Pfm
  module Command
    module GeneratorCommands
      # ## Base
      #
      # Base class for `chef generate` subcommands. Contains basic behaviors
      # for setting up the generator context, detecting git, and launching a
      # chef converge.
      #
      # The behavior of the generators is largely delegated to a chef cookbook.
      # The default implementation is the `code_generator` cookbook in
      # pfm/skeletons/code_generator.
      class Base < Command::Base

        attr_reader :params
        attr_reader :errors

        options.merge!(SharedGeneratorOptions.options)

        def initialize(params)
          super()
          @params_valid = true
          @errors = []
          @params = params
        end

        def setup_context
        end

        def read_and_validate_params
          arguments = parse_options(params)
          case arguments.size
          when 1

          when 2

          else
            @params_valid = false
          end
        end

        def params_valid?
          @params_valid
        end
      end
    end
  end
end

Version data entries

62 entries across 62 versions & 2 rubygems

Version Path
iapi-idlc-sdk-pfm-1.0.18 lib/iapi-idlc-sdk-pfm/command/generator_commands/base.rb
iapi-idlc-sdk-pfm-1.0.17 lib/iapi-idlc-sdk-pfm/command/generator_commands/base.rb
iapi-idlc-sdk-pfm-1.0.16 lib/iapi-idlc-sdk-pfm/command/generator_commands/base.rb
iapi-idlc-sdk-pfm-1.0.15 lib/iapi-idlc-sdk-pfm/command/generator_commands/base.rb
iapi-idlc-sdk-pfm-1.0.14 lib/iapi-idlc-sdk-pfm/command/generator_commands/base.rb
iapi-idlc-sdk-pfm-1.0.13 lib/iapi-idlc-sdk-pfm/command/generator_commands/base.rb
iapi-idlc-sdk-pfm-1.0.12 lib/iapi-idlc-sdk-pfm/command/generator_commands/base.rb
iapi-idlc-sdk-pfm-1.0.11 lib/iapi-idlc-sdk-pfm/command/generator_commands/base.rb
iapi-idlc-sdk-pfm-1.0.10 lib/iapi-idlc-sdk-pfm/command/generator_commands/base.rb
iapi-idlc-sdk-pfm-1.0.9 lib/iapi-idlc-sdk-pfm/command/generator_commands/base.rb
iapi-idlc-sdk-pfm-1.0.8 lib/iapi-idlc-sdk-pfm/command/generator_commands/base.rb
iapi-idlc-sdk-pfm-1.0.7 lib/iapi-idlc-sdk-pfm/command/generator_commands/base.rb
iapi-idlc-sdk-pfm-1.0.6 lib/iapi-idlc-sdk-pfm/command/generator_commands/base.rb
iapi-idlc-sdk-pfm-1.0.5 lib/iapi-idlc-sdk-pfm/command/generator_commands/base.rb
iapi-idlc-sdk-pfm-1.0.4 lib/iapi-idlc-sdk-pfm/command/generator_commands/base.rb
idlc-sdk-pfm-1.2.2 lib/idlc-sdk-pfm/command/generator_commands/base.rb
idlc-sdk-pfm-1.2.1 lib/idlc-sdk-pfm/command/generator_commands/base.rb
idlc-sdk-pfm-1.2.0 lib/idlc-sdk-pfm/command/generator_commands/base.rb
idlc-sdk-pfm-1.1.4 lib/idlc-sdk-pfm/command/generator_commands/base.rb
idlc-sdk-pfm-1.1.3 lib/idlc-sdk-pfm/command/generator_commands/base.rb