class Dino::Apis::News
Public Class Methods
all(**args)
click to toggle source
# File lib/dino/apis/news.rb, line 4 def self.all(**args) new(**args) end
Public Instance Methods
map() { |item| ... }
click to toggle source
# File lib/dino/apis/news.rb, line 8 def map return to_enum(__method__) unless block_given? response['Items'].map do |item| yield(Models::Item.new(item)) end end
total_count()
click to toggle source
# File lib/dino/apis/news.rb, line 16 def total_count response['Total'] end
Private Instance Methods
response()
click to toggle source
# File lib/dino/apis/news.rb, line 22 def response @response ||= fetch_data(options[:path] || 'news') end