Sha256: 14f07360764e3996f9d6080a706dfb3f464da52b8974ff6dd8625ddec6303fed

Contents?: true

Size: 730 Bytes

Versions: 2

Compression:

Stored size: 730 Bytes

Contents

# ==========================================================================
# Project:   Web Typed Array
# Copyright: ©2010 Strobe Inc. All rights reserved.
# License:   Licened under MIT license (see LICENSE)
# ==========================================================================

module WebTypedArray
  
  class ArrayBufferExports < Spade::Runtime::Exports
    
    # TODO: Use a string to keep the buffer packed instead of the much more
    # expensive Array
    class ArrayBuffer
      
      attr_reader :buf
      
      def initialize(size)
        @buf = "\0"*size 
      end
      
      def byteLength
        @buf.size
      end
      
    end
    
  end
  
end

Spade.exports WebTypedArray::ArrayBufferExports

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
spade-packager-0.1.0.1 packages/web-typed-array/lib/ruby/array_buffer.rb
spade-packager-0.1.0 packages/web-typed-array/lib/ruby/array_buffer.rb