Class: Example.Animal Abstract Deprecated

Defined in: node_modules/codo/spec/_templates/example/src/animal.coffee

Overview

Deprecated. This class is not used anymore
This class is abstract. Each animal implementation must inherit from {Animal}
TODO: Provide more examples
Note: This is not used for codo, its purpose is to show all possible tags within a class.

Base class for all animals.

Examples:

How to subclass an animal

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

Author:

Since:

Version:

Direct Known Subclasses

Example.Animal.Lion

Variables Summary

ANSWER =
42

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

Class Method Summary

Instance Method Summary

Class Method Details

. (Boolean) enterArk()

Moves all animal into the ark.

Returns:

  • (Boolean) — true when all in Ark

Constructor Details

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

TODO: Clean up

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 = {})

This method is abstract.

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

# (Boolean) copulate(animal) Bound Private

Deprecated. Do not copulate
Note: Don't take it seriously

Copulate another animal.

Parameters:

  • animal (Animal) the partner animal

Returns:

  • (Boolean) — true when success

Author:

  • Michael Kessler

Since:

  • 0.1.0

Version:

  • 0.2.0

    Quickly fuzzy find classes, mixins, methods, file:

    Control the navigation frame:

    You can focus and blur the search input: