Sha256: ac78686f1056cd7ea9a02e0a997213333f388f2d53c576b115d1a6206d80135f

Contents?: true

Size: 439 Bytes

Versions: 12

Compression:

Stored size: 439 Bytes

Contents

module Opal
  module RSpec
    class DocumentIO < IO
      include IO::Writable

      def initialize
        `document.open();`
      end

      def close
        @closed = true
        `document.close()`
      end

      def write(html)
        if @closed
          `console.error(#{"DOC closed, can't write #{html}" })`
        else
          `document.write(#{html})`
        end
      end

      def flush
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
opal-rspec-0.8.0.alpha1 lib-opal/opal/rspec/formatter/document_io.rb
opal-rspec-0.7.1 lib-opal/opal/rspec/formatter/document_io.rb
opal-rspec-0.7.0 lib-opal/opal/rspec/formatter/document_io.rb
opal-rspec-0.6.2 opal/opal/rspec/formatter/document_io.rb
opal-rspec-0.7.0.rc.2 lib-opal/opal/rspec/formatter/document_io.rb
opal-rspec-0.7.0.rc.1 lib-opal/opal/rspec/formatter/document_io.rb
opal-rspec-0.6.1 opal/opal/rspec/formatter/document_io.rb
opal-rspec-0.6.0 opal/opal/rspec/formatter/document_io.rb
opal-rspec-0.6.0.beta1 opal/opal/rspec/formatter/document_io.rb
opal-connect-rspec-0.5.0 opal/opal/rspec/formatter/document_io.rb
opal-rspec-0.5.0 opal/opal/rspec/formatter/document_io.rb
opal-rspec-0.5.0.beta3 opal/opal/rspec/formatter/document_io.rb