Sha256: d4aaa39e88c3a82596c3f1ba8359196e8fb92b7b9c3a0ac865bd585384a30288

Contents?: true

Size: 604 Bytes

Versions: 4

Compression:

Stored size: 604 Bytes

Contents

require 'taketo/config_traverser'
require 'taketo/config_validator'

module Taketo
  module Actions

    class BaseAction
      attr_reader :options, :destination_path

      def initialize(options)
        @options          = options
        @destination_path = options[:destination_path]
      end

      def config
        @config ||= begin
          config_file = options[:config]

          DSL.new.configure(config_file).tap do |config|
            traverser = ConfigTraverser.new(config)
            ConfigValidator.new(traverser).validate!
          end
        end
      end
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
taketo-0.3.1 lib/taketo/actions/base_action.rb
taketo-0.3.0 lib/taketo/actions/base_action.rb
taketo-0.2.0 lib/taketo/actions/base_action.rb
taketo-0.2.0.alpha lib/taketo/actions/base_action.rb