Sha256: 6490e1a9776a7376620378e726b19528f2ad76afec021c83a60b071170bec17b

Contents?: true

Size: 310 Bytes

Versions: 10

Compression:

Stored size: 310 Bytes

Contents

# frozen_string_literal: true

module Matheus
  class Command
    include Result::Methods
    extend StringFormat

    def self.call(argv)
      new
        .call(argv)
        .then { Result.from(_1) } # ensure it's a Result object
        .on_failure { |error_msg| abort error(error_msg) }
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
matheus-0.6.3 lib/matheus/command.rb
matheus-0.6.2 lib/matheus/command.rb
matheus-0.6.1 lib/matheus/command.rb
matheus-0.6.0 lib/matheus/command.rb
matheus-0.5.0 lib/matheus/command.rb
matheus-0.4.0 lib/matheus/command.rb
matheus-0.3.0 lib/matheus/command.rb
matheus-0.2.1 lib/matheus/command.rb
matheus-0.2.0 lib/matheus/command.rb
matheus-0.1.0 lib/matheus/command.rb