Sha256: 9f8f86b9588800536ef6bf5c5e3a2708bae402723a8387b91f7cad9a0543da45

Contents?: true

Size: 374 Bytes

Versions: 1

Compression:

Stored size: 374 Bytes

Contents

module Ddr
  module FileTools
    class Tool

      attr_reader :command, :provider

      def initialize(opts)
        @command = opts.fetch(:command)
        @provider = opts.fetch(:provider)
      end

      def call(*args)
        build_command.call(*args)
      end

      private

      def build_command
        command.new(provider.new)
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ddr-filetools-0.4.0 lib/ddr/filetools/tool.rb