Module: IO::Writable

Defined in:
opal/opal/corelib/io.rb

Instance Method Summary collapse

Instance Method Details

#<<(string) ⇒ Object



7
8
9
10
11
# File 'opal/opal/corelib/io.rb', line 7

def <<(string)
  write(string)

  self
end


13
14
15
# File 'opal/opal/corelib/io.rb', line 13

def print(*args)
  write args.map { |arg| String(arg) }.join($,)
end

#puts(*args) ⇒ Object



17
18
19
# File 'opal/opal/corelib/io.rb', line 17

def puts(*args)
  write args.map { |arg| String(arg) }.join($/)
end