Class: MiniRacer::Platform
- Inherits:
-
Object
- Object
- MiniRacer::Platform
- Defined in:
- lib/mini_racer.rb,
lib/mini_racer/truffleruby.rb
Class Method Summary collapse
Class Method Details
.set_flag_as_str!(flag) ⇒ Object
334 335 336 337 338 |
# File 'lib/mini_racer/truffleruby.rb', line 334 def self.set_flag_as_str!(flag) raise TypeError, "wrong type argument #{flag.class} (should be a string)" unless flag.is_a?(String) raise MiniRacer::PlatformAlreadyInitialized, "The platform is already initialized." if Context.instance_variable_get(:@context_initialized) Context.instance_variable_set(:@use_strict, true) if "--use_strict" == flag end |
.set_flags!(*args, **kwargs) ⇒ Object
87 88 89 90 91 92 |
# File 'lib/mini_racer.rb', line 87 def set_flags!(*args, **kwargs) flags_to_strings([args, kwargs]).each do |flag| # defined in the C class set_flag_as_str!(flag) end end |