Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

object: add property definer #97

Merged
merged 2 commits into from
Dec 2, 2014
Merged

object: add property definer #97

merged 2 commits into from
Dec 2, 2014

Conversation

usirin
Copy link
Member

@usirin usirin commented Dec 2, 2014

o = new KDObject
o.define 'fullName', -> 
  "#{@firstName} #{@lastName}"  if @firstName and @lastName


console.log o.fullName # returns undefined

o.firstName = 'John'
o.lastName = 'Doe'

console.log o.fullName # returns 'John Doe'

o = new KDObject
o.define 'height', => window.height - @wrapper.height
sinan added a commit that referenced this pull request Dec 2, 2014
object: add property definer
@sinan sinan merged commit cbc40bd into koding:master Dec 2, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants