Class: GhostRb::Resources::User
- Inherits:
-
BaseResource
- Object
- BaseResource
- GhostRb::Resources::User
- Defined in:
- lib/ghost_rb/resources/user.rb
Overview
Instance Attribute Summary collapse
- #bio ⇒ Object
- #id ⇒ Object
- #location ⇒ Object
- #name ⇒ Object
- #posts_count ⇒ Object
- #slug ⇒ Object
- #visibility ⇒ Object
- #website ⇒ Object
Class Method Summary collapse
Methods inherited from BaseResource
Methods included from Support::Hydratable
Instance Attribute Details
#bio ⇒ Object
8 9 10 |
# File 'lib/ghost_rb/resources/user.rb', line 8 def bio @bio end |
#id ⇒ Object
8 9 10 |
# File 'lib/ghost_rb/resources/user.rb', line 8 def id @id end |
#location ⇒ Object
8 9 10 |
# File 'lib/ghost_rb/resources/user.rb', line 8 def location @location end |
#name ⇒ Object
8 9 10 |
# File 'lib/ghost_rb/resources/user.rb', line 8 def name @name end |
#posts_count ⇒ Object
8 9 10 |
# File 'lib/ghost_rb/resources/user.rb', line 8 def posts_count @posts_count end |
#slug ⇒ Object
8 9 10 |
# File 'lib/ghost_rb/resources/user.rb', line 8 def slug @slug end |
#visibility ⇒ Object
8 9 10 |
# File 'lib/ghost_rb/resources/user.rb', line 8 def visibility @visibility end |
#website ⇒ Object
8 9 10 |
# File 'lib/ghost_rb/resources/user.rb', line 8 def website @website end |
Class Method Details
.generate(hash) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/ghost_rb/resources/user.rb', line 11 def self.generate(hash) inst = super(hash) inst.posts_count = hash[:count][:posts].to_i if hash.key?(:count) inst end |