Class: Poundie::Campfire::User
- Inherits:
-
Object
- Object
- Poundie::Campfire::User
- Defined in:
- lib/poundie/campfire/user.rb
Class Method Summary collapse
Instance Method Summary collapse
- #admin? ⇒ Boolean
- #created_at ⇒ Object
- #email_address ⇒ Object
- #id ⇒ Object
-
#initialize(hash) ⇒ User
constructor
A new instance of User.
- #name ⇒ Object
- #type ⇒ Object
Constructor Details
#initialize(hash) ⇒ User
Returns a new instance of User.
15 16 17 |
# File 'lib/poundie/campfire/user.rb', line 15 def initialize(hash) @hash = hash end |
Class Method Details
.cache ⇒ Object
11 12 13 |
# File 'lib/poundie/campfire/user.rb', line 11 def self.cache @cache ||= {} end |
Instance Method Details
#admin? ⇒ Boolean
31 32 33 |
# File 'lib/poundie/campfire/user.rb', line 31 def admin? @hash[:admin] end |
#created_at ⇒ Object
35 36 37 |
# File 'lib/poundie/campfire/user.rb', line 35 def created_at @hash[:admin] end |
#email_address ⇒ Object
27 28 29 |
# File 'lib/poundie/campfire/user.rb', line 27 def email_address @hash[:email_address] end |
#id ⇒ Object
19 20 21 |
# File 'lib/poundie/campfire/user.rb', line 19 def id @hash[:id] end |
#name ⇒ Object
23 24 25 |
# File 'lib/poundie/campfire/user.rb', line 23 def name @hash[:name] end |
#type ⇒ Object
39 40 41 |
# File 'lib/poundie/campfire/user.rb', line 39 def type @hash[:type] end |