Class: Coursemology::Evaluator::StringIO

Inherits:
StringIO
  • Object
show all
Defined in:
lib/coursemology/evaluator/string_io.rb

Overview

Adapter for StringIO for compatibility with RubyZip.

StringIO does not inherit from IO, so RubyZip does not accept StringIO in place of IO.

Instance Method Summary collapse

Instance Method Details

#is_a?(klass) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/coursemology/evaluator/string_io.rb', line 6

def is_a?(klass)
  klass == IO || super
end

#pathObject

RubyZip assumes all IO objects respond to path.



11
12
13
# File 'lib/coursemology/evaluator/string_io.rb', line 11

def path
  self
end