Class: Mailosaur::Models::PreviewListResult

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/Mailosaur/models/preview_list_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_json

Constructor Details

#initialize(data = {}) ⇒ PreviewListResult



4
5
6
7
# File 'lib/Mailosaur/models/preview_list_result.rb', line 4

def initialize(data = {})
  @items = []
  (data['items'] || []).each { |i| @items << Mailosaur::Models::Preview.new(i) }
end

Instance Attribute Details

#itemsArray<Preview>

The summaries for each requested preview.



11
12
13
# File 'lib/Mailosaur/models/preview_list_result.rb', line 11

def items
  @items
end