Sha256: b8da42dd5c19b224a08202e40bc7bca8184bc363c6e5ca16f5869a469af54462

Contents?: true

Size: 376 Bytes

Versions: 3

Compression:

Stored size: 376 Bytes

Contents

# frozen_string_literal: true
# Adapter for StringIO for compatibility with RubyZip.
#
# StringIO does not inherit from IO, so RubyZip does not accept StringIO in place of IO.
class Coursemology::Evaluator::StringIO < ::StringIO
  def is_a?(klass)
    klass == IO || super
  end

  # RubyZip assumes all IO objects respond to path.
  def path
    self
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
coursemology-evaluator-0.1.6 lib/coursemology/evaluator/string_io.rb
coursemology-evaluator-0.1.4 lib/coursemology/evaluator/string_io.rb
coursemology-evaluator-0.1.3 lib/coursemology/evaluator/string_io.rb