1.0.0 • Published 11 years ago

delegato v1.0.0

Weekly downloads
8,196
License
-
Repository
-
Last release
11 years ago

delegato Build Status

Delegate Methods

Delegato = require 'delegato'

class Ship
  Delegato.includeInto(this)
  
  @delegatesMethods 'dropAnchor', 'raiseAnchor', toProperty: 'winch'
  @delegatesMethod 'leavePort', toMethod: 'getCaptain'

Delegate Properties

class MyClass
  Delegato.includeInto(this)
  
  @delegatesProperty 'steamPressure', toProperty: 'engineRoom'
  @delegatesProperties 'heading', 'speed', toMethod: 'getVelocity'