remove _ in names
This commit is contained in:
parent
829db87c40
commit
3af7344581
1270 changed files with 0 additions and 18916 deletions
|
|
@ -1,24 +0,0 @@
|
|||
class Delegator
|
||||
operation: ->
|
||||
if @delegate and typeof (@delegate.thing) is "function"
|
||||
return @delegate.thing()
|
||||
"default implementation"
|
||||
|
||||
class Delegate
|
||||
thing: ->
|
||||
"Delegate Implementation"
|
||||
|
||||
testDelegator = ->
|
||||
# Delegator with no delegate.
|
||||
a = new Delegator()
|
||||
console.log a.operation()
|
||||
|
||||
# Delegator with delegate not implementing "thing"
|
||||
a.delegate = "A delegate may be any object"
|
||||
console.log a.operation()
|
||||
|
||||
# Delegator with delegate that does implement "thing"
|
||||
a.delegate = new Delegate()
|
||||
console.log a.operation()
|
||||
|
||||
testDelegator()
|
||||
Loading…
Add table
Add a link
Reference in a new issue