Class: Class::IOWriter
- Inherits:
-
Object
- Object
- Class::IOWriter
- Defined in:
- lib/gherkin/native/java.rb
Instance Method Summary collapse
- #close ⇒ Object
- #flush ⇒ Object
-
#initialize(io) ⇒ IOWriter
constructor
A new instance of IOWriter.
- #write(cbuf, off, len) ⇒ Object
Constructor Details
#initialize(io) ⇒ IOWriter
Returns a new instance of IOWriter.
3 4 5 |
# File 'lib/gherkin/native/java.rb', line 3 def initialize(io) @io = io end |
Instance Method Details
#close ⇒ Object
15 16 17 |
# File 'lib/gherkin/native/java.rb', line 15 def close @io.close end |
#flush ⇒ Object
11 12 13 |
# File 'lib/gherkin/native/java.rb', line 11 def flush @io.flush end |
#write(cbuf, off, len) ⇒ Object
7 8 9 |
# File 'lib/gherkin/native/java.rb', line 7 def write(cbuf, off, len) @io.write(cbuf.unpack("U*")[off..len].pack("U*")) end |