Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

atom/delegato

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Atom and all repositories under Atom will be archived on December 15, 2022. Learn more in our official announcement

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'