Class: CoderWally::CoderWall

Inherits:
Object
  • Object
show all
Defined in:
lib/coder_wally/coder_wall.rb

Overview

Stores all CoderWall attributes

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(user) ⇒ CoderWall

Instantiate the class with data



11
12
13
14
15
# File 'lib/coder_wally/coder_wall.rb', line 11

def initialize(user)
  @user = user
  @badges = user.badges
  @accounts = user.accounts
end

Instance Attribute Details

#accountsObject (readonly)

:badges is the collection of user badges :user is the ‘User` object (with badges and accounts) :accounts is the `Account` object



8
9
10
# File 'lib/coder_wally/coder_wall.rb', line 8

def accounts
  @accounts
end

#badgesObject (readonly)

:badges is the collection of user badges :user is the ‘User` object (with badges and accounts) :accounts is the `Account` object



8
9
10
# File 'lib/coder_wally/coder_wall.rb', line 8

def badges
  @badges
end

#userObject (readonly)

:badges is the collection of user badges :user is the ‘User` object (with badges and accounts) :accounts is the `Account` object



8
9
10
# File 'lib/coder_wally/coder_wall.rb', line 8

def user
  @user
end