Sha256: fbcd085fc3a9d7c7c79d0f6600d330e957ad6b9765c74f8f1eade2010bc51ab8

Contents?: true

Size: 383 Bytes

Versions: 7

Compression:

Stored size: 383 Bytes

Contents

module LearnOpen
  module Adapters
    class IOAdapter
      attr_reader :input, :output

      def initialize(input:, output:)
        @input = input
        @output = output
      end

      def puts(*message)
        output.puts(*message)
      end

      def print(*message)
        output.print(*message)
      end

      def gets
        input.gets
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
learn-open-1.2.28 lib/learn_open/adapters/io_adapter.rb
learn-open-1.2.27 lib/learn_open/adapters/io_adapter.rb
learn-open-1.2.26 lib/learn_open/adapters/io_adapter.rb
learn-open-1.2.24 lib/learn_open/adapters/io_adapter.rb
learn-open-1.2.23 lib/learn_open/adapters/io_adapter.rb
learn-open-1.2.22 lib/learn_open/adapters/io_adapter.rb
learn-open-1.2.21 lib/learn_open/adapters/io_adapter.rb