Class: MisarBlog::Models::ArticleList

Inherits:
Base
  • Object
show all
Defined in:
lib/misarblog/models.rb

Overview

Result of GET /articles.

Instance Attribute Summary

Attributes inherited from Base

#raw

Instance Method Summary collapse

Methods inherited from Base

#[], #initialize, #to_h

Constructor Details

This class inherits a constructor from MisarBlog::Models::Base

Instance Method Details

#articlesObject



40
# File 'lib/misarblog/models.rb', line 40

def articles; (@raw["articles"] || []).map { |a| Article.new(a) }; end

#totalObject



41
# File 'lib/misarblog/models.rb', line 41

def total;    @raw["total"];                                       end