eval.in

Paste #1471

Slash — Slash HEAD, pasted 4 years ago

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
<%

class Greeter {
  def init(name) {
    @name = name;
  }

  def greet {
    print("Hello #{@name}!");
  }
}

greeter = Greeter.new("Charlie");
greeter.greet;

Program Output

Hello Charlie!

OK (0.008 sec real, 0.006 sec wall, 5 MB, 10 syscalls)

Fork