Class: GhostRb::Resources::User

Inherits:
BaseResource show all
Defined in:
lib/ghost_rb/resources/user.rb

Overview

Author:

  • Rene Hernandez

Since:

  • 0.1

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from BaseResource

hash_value?

Methods included from Support::Hydratable

#hydrate

Instance Attribute Details

#bioObject

Since:

  • 0.1



8
9
10
# File 'lib/ghost_rb/resources/user.rb', line 8

def bio
  @bio
end

#idObject

Since:

  • 0.1



8
9
10
# File 'lib/ghost_rb/resources/user.rb', line 8

def id
  @id
end

#locationObject

Since:

  • 0.1



8
9
10
# File 'lib/ghost_rb/resources/user.rb', line 8

def location
  @location
end

#nameObject

Since:

  • 0.1



8
9
10
# File 'lib/ghost_rb/resources/user.rb', line 8

def name
  @name
end

#posts_countObject

Since:

  • 0.1



8
9
10
# File 'lib/ghost_rb/resources/user.rb', line 8

def posts_count
  @posts_count
end

#slugObject

Since:

  • 0.1



8
9
10
# File 'lib/ghost_rb/resources/user.rb', line 8

def slug
  @slug
end

#visibilityObject

Since:

  • 0.1



8
9
10
# File 'lib/ghost_rb/resources/user.rb', line 8

def visibility
  @visibility
end

#websiteObject

Since:

  • 0.1



8
9
10
# File 'lib/ghost_rb/resources/user.rb', line 8

def website
  @website
end

Class Method Details

.generate(hash) ⇒ Object

Since:

  • 0.1



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