Module: Enumerable

Included in:
Buffer::Array, Matrix, Native::Array, Vector
Defined in:
opal/stdlib/json.rb,
opal/stdlib/await.rb

Overview

BUG: Enumerable must come before Array, otherwise it overrides #to_json this is due to how modules are implemented.

Instance Method Summary collapse

Instance Method Details

#each_async(&block) ⇒ Object



33
34
35
# File 'opal/stdlib/await.rb', line 33

def each_async(&block)
  PromiseV2.when(*map(&block)).await
end

#to_jsonObject



130
131
132
# File 'opal/stdlib/json.rb', line 130

def to_json
  to_a.to_json
end