Sha256: f50f33c16666ad19610b3114a2cf7c2d4ff1d4938c26f2b86f470e4e19054183

Contents?: true

Size: 535 Bytes

Versions: 18

Compression:

Stored size: 535 Bytes

Contents

class Animal {
    constructor(public name) { }
    move(meters) {
        alert(this.name + " moved " + meters + "m.");
    }
}

class Snake extends Animal {
    constructor(name) { super(name); }
    move() {
        alert("Slithering...");
        super.move(5);
    }
}

class Horse extends Animal {
    constructor(name) { super(name); }
    move() {
        alert("Galloping...");
        super.move(45);
    }
}

var sam = new Snake("Sammy the Python")
var tom: Animal = new Horse("Tommy the Palomino")

sam.move()
tom.move(34)

Version data entries

18 entries across 18 versions & 5 rubygems

Version Path
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/gems/pygments.rb-0.6.3/vendor/pygments-main/tests/examplefiles/example.ts
pygments.rb-0.6.3 vendor/pygments-main/tests/examplefiles/example.ts
pygments.rb-0.6.2 vendor/pygments-main/tests/examplefiles/example.ts
pygments.rb-0.6.1 vendor/pygments-main/tests/examplefiles/example.ts
pygments.rb-0.6.0 vendor/pygments-main/tests/examplefiles/example.ts
mortar-pygments.rb-0.5.7 vendor/pygments-main/tests/examplefiles/example.ts
mortar-pygments.rb-0.5.6 vendor/pygments-main/tests/examplefiles/example.ts
mortar-pygments.rb-0.5.5 vendor/pygments-main/tests/examplefiles/example.ts
pygments.rb-jruby-0.5.4.2 vendor/pygments-main/tests/examplefiles/example.ts
pygments.rb-jruby-0.5.4.1 vendor/pygments-main/tests/examplefiles/example.ts
pygments.rb-jruby-0.5.4 vendor/pygments-main/tests/examplefiles/example.ts
gitlab-pygments.rb-0.5.4 vendor/pygments-main/tests/examplefiles/example.ts
pygments.rb-0.5.4 vendor/pygments-main/tests/examplefiles/example.ts
pygments.rb-0.5.2 vendor/pygments-main/tests/examplefiles/example.ts
pygments.rb-0.5.1 vendor/pygments-main/tests/examplefiles/example.ts
pygments.rb-0.5.0 vendor/pygments-main/tests/examplefiles/example.ts
pygments.rb-0.4.2 vendor/pygments-main/tests/examplefiles/example.ts
pygments.rb-0.4.1 vendor/pygments-main/tests/examplefiles/example.ts