Class: RubyRunJs::JsError
- Inherits:
-
JsBaseObject
- Object
- JsBaseObject
- RubyRunJs::JsError
- Defined in:
- lib/ruby_run_js/objects/js_error.rb
Instance Attribute Summary
Attributes inherited from JsBaseObject
#_class, #extensible, #own, #prototype, #value
Instance Method Summary collapse
-
#initialize(message, prototype) ⇒ JsError
constructor
A new instance of JsError.
Methods inherited from JsBaseObject
#_type, #can_put, #default_value, #define_own_property, #delete, #get, #get_items, #get_own_property, #get_property, #has_property, #put, #set_items
Methods included from Helper
#check_object, #get_member, #get_member_dot, #is_accessor_descriptor, #is_callable, #is_data_descriptor, #is_generic_descriptor, #is_primitive, #make_error, #strict_equality
Methods included from ConversionHelper
#convert_to_js_type, #to_boolean, #to_int32, #to_integer, #to_number, #to_object, #to_primitive, #to_string, #to_uint16, #to_uint32
Constructor Details
#initialize(message, prototype) ⇒ JsError
Returns a new instance of JsError.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/ruby_run_js/objects/js_error.rb', line 7 def initialize(, prototype) super() @prototype = prototype @_class = 'Error' if != undefined define_own_property('message', { 'value' => to_string(), 'writable' => true, 'enumerable' => false, 'configurable' => true }) end end |