Class: Example.Animal

Defined in: node_modules/grunt-codo/test/fixtures/default/animal.coffee

Overview

Base class for all animals.

Examples:

How to subclass an animal

class Lion extends Animal
  move: (direction, speed) ->

Variables Summary

ANSWER =
42

The Answer to the Ultimate Question of Life, the Universe, and Everything

Instance Method Summary

Constructor Details

# (void) constructor(name, birthDate = new Date())

Construct a new animal.

Parameters:

  • name ( String ) the name of the animal
  • birthDate ( Date ) when the animal was born

Instance Method Details

# (void) move(options = {})

Move the animal.

Examples:

Move an animal

new Lion('Simba').move('south', 12)

Parameters:

  • options ( Object ) the moving options

Options Hash: (options):

  • direction ( String ) the moving direction
  • speed ( Number ) the speed in mph

    Quickly fuzzy find classes, mixins, methods, file:

    Control the navigation frame:

    You can focus and blur the search input: