Top Level Namespace

Defined Under Namespace

Modules: Comparable, Enumerable, Errno, Kernel, Opal, __JS__ Classes: ArgumentError, Array, BasicObject, Boolean, Class, Encoding, Enumerator, Exception, Float, FloatDomainError, Hash, IO, IOError, IndexError, Integer, KeyError, LocalJumpError, MatchData, Method, Module, NameError, NilClass, NoMethodError, NotImplementedError, Numeric, Proc, Range, RangeError, Regexp, RuntimeError, ScriptError, StandardError, StopIteration, String, Struct, SyntaxError, SystemCallError, SystemExit, Time, TypeError, UnboundMethod

Constant Summary

ARGV =
[]
ARGF =
Object.new
ENV =
{}
RUBY_PLATFORM =
'opal'
RUBY_ENGINE =
'opal'
RUBY_VERSION =
'1.9.3'
RUBY_ENGINE_VERSION =
'0.5.5'
RUBY_RELEASE_DATE =
'2013-11-25'
STDERR =
$stderr = IO.new
STDIN =
$stdin  = IO.new
STDOUT =
$stdout = IO.new
Symbol =
String
TrueClass =
Boolean
FalseClass =
Boolean
TRUE =
true
FALSE =
false
Fixnum =
Numeric
NIL =
nil

Class Method Summary collapse

Class Method Details

.include(mod) ⇒ Object



5
6
7
# File 'opal/opal/corelib/main.rb', line 5

def self.include(mod)
  Object.include mod
end

.puts(*strs) ⇒ Object



45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'opal/opal/corelib/io.rb', line 45

def $stdout.puts(*strs)
  %x{
    for (var i = 0; i < strs.length; i++) {
      if (strs[i] instanceof Array) {
        #{puts(*`strs[i]`)};
      }
      else {
        console.log(#{`strs[i]`.to_s});
      }
    }
  }

  nil
end

.to_sObject



1
2
3
# File 'opal/opal/corelib/main.rb', line 1

def self.to_s
  'main'
end