[フレーム]

Class: Struct

Inherits:
Object show all
Defined in:
opal/stdlib/native.rb

Direct Known Subclasses

SourceMap::Mapping

Instance Method Summary collapse

  • #to_n ⇒ Object

    Public: Returns a JavaScript object with the members as keys and their values as values.

Instance Method Details

#to_nObject

Public: Returns a JavaScript object with the members as keys and their values as values.

475
476
477
478
479
480
481
482
483
# File 'opal/stdlib/native.rb', line 475
def to_n
 result = `{}`
 each_pair {|name, value|
 `#{result}[#{name}] = #{Native .try_convert (value)}`
 }
 result
end

AltStyle によって変換されたページ (->オリジナル) /