Sha256: b8328f63e5f002a869d96123ffbe0ef0f458267ffa1ac31e784b2d494fa1ff9d

Contents?: true

Size: 365 Bytes

Versions: 1

Compression:

Stored size: 365 Bytes

Contents

require 'bijo/command'
require 'bijo/arguments'

module Bijo
  class CommandBuilder
    def initialize(argv)
      @argv = argv
    end

    def build
      if arguments.valid?
        Command.new(arguments)
      else
        fail ArgumentError, 'arguments is invalid'
      end
    end

    private

    def arguments
      Arguments.new(@argv)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bijo-0.0.1 lib/bijo/command_builder.rb