Module: Native::Wrapper
- Included in:
- Buffer, Buffer::Array, Buffer::View, Console, Array, Object
- Defined in:
- opal/stdlib/native.rb
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(native) ⇒ Object
-
#to_n ⇒ Object
Returns the internal native JavaScript value.
Class Method Details
Instance Method Details
#initialize(native) ⇒ Object
190 191 192 193 194 195 196 |
# File 'opal/stdlib/native.rb', line 190 def initialize(native) unless ::Kernel.native?(native) ::Kernel.raise ArgumentError, "#{native.inspect} isn't native" end @native = native end |
#to_n ⇒ Object
Returns the internal native JavaScript value
199 200 201 |
# File 'opal/stdlib/native.rb', line 199 def to_n @native end |