Refactor website with new design & structure

This commit is contained in:
Andrew Miner
2016-04-03 19:30:15 -07:00
parent ec7e8c883d
commit d69585facd
406 changed files with 7411 additions and 37859 deletions
+32
View File
@@ -0,0 +1,32 @@
#
# Crafting Guide - github_user.coffee
#
# Copyright © 2014-2016 by Redwood Labs
# All rights reserved.
#
BaseModel = require '../base_model'
########################################################################################################################
module.exports = class GitHubUser extends BaseModel
constructor: (attributes={}, options={})->
attributes.avatarUrl ?= attributes.avatar_url ?= null
attributes.email ?= null
attributes.login ?= null
attributes.name ?= null
super attributes, options
# Property Methods #############################################################################
isAuthenticated: ->
return @login?
Object.defineProperties @prototype,
authenticated: {get:@prototype.isAuthenticated}
# Object Overrides #############################################################################
toString: ->
return "#{@name} (#{@login})"