Module: Kernel
- Defined in:
- lib/glimmer-dsl-web.rb,
lib/glimmer-dsl-web/ext/kernel.rb,
lib/glimmer/dsl/web/element_expression.rb
Overview
Copyright © 2023-2024 Andy Maleh
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Instance Method Summary collapse
- #__dir__ ⇒ Object
- #include_package(package) ⇒ Object
- #p(*args) ⇒ Object (also: #pi)
-
#p_without_glimmer ⇒ Object
TODO contribute to Opal.
- #puts(*strs) ⇒ Object
-
#puts_without_glimmer ⇒ Object
TODO contribute to Opal.
Instance Method Details
#__dir__ ⇒ Object
46 47 48 |
# File 'lib/glimmer-dsl-web.rb', line 46 def __dir__ '(dir)' end |
#include_package(package) ⇒ Object
42 43 44 |
# File 'lib/glimmer-dsl-web.rb', line 42 def include_package(package) # No Op (just a shim) end |
#p(*args) ⇒ Object Also known as: pi
37 38 39 40 41 42 43 |
# File 'lib/glimmer-dsl-web/ext/kernel.rb', line 37 def p(*args) p_without_glimmer(*args) rescue Exception args.each do |arg| `console.log(#{arg})` end end |
#p_without_glimmer ⇒ Object
TODO contribute to Opal
36 |
# File 'lib/glimmer-dsl-web/ext/kernel.rb', line 36 alias p_without_glimmer p |
#puts(*strs) ⇒ Object
27 28 29 30 31 32 33 |
# File 'lib/glimmer-dsl-web/ext/kernel.rb', line 27 def puts(*strs) puts_without_glimmer(*strs) rescue Exception strs.each do |str| `console.log(#{str})` end end |
#puts_without_glimmer ⇒ Object
TODO contribute to Opal
26 |
# File 'lib/glimmer-dsl-web/ext/kernel.rb', line 26 alias puts_without_glimmer puts |