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