Class: Boolean

Inherits:
Object show all
Defined in:
/Users/elia/Code/opal-docs/opal/stdlib/json.rb,
/Users/elia/Code/opal-docs/opal/stdlib/native.rb

Instance Method Summary collapse

Instance Method Details

#to_jsonObject


136
137
138
# File '/Users/elia/Code/opal-docs/opal/stdlib/json.rb', line 136

def to_json
  `(self == true) ? 'true' : 'false'`
end

#to_nObject

Public: Returns the internal JavaScript value (with valueOf).


510
511
512
# File '/Users/elia/Code/opal-docs/opal/stdlib/native.rb', line 510

def to_n
  `self.valueOf()`
end