class Nvlope::MessageCollection

Attributes

nvlope[R]
raw[R]

Public Class Methods

new(nvlope, raw) click to toggle source
# File lib/nvlope/message_collection.rb, line 5
def initialize nvlope, raw
  @nvlope, @raw = nvlope, raw
end

Public Instance Methods

bookmark() click to toggle source
# File lib/nvlope/message_collection.rb, line 23
def bookmark
  raw['bookmark']
end
each(&block) click to toggle source
# File lib/nvlope/message_collection.rb, line 16
def each &block
  to_a.each(&block)
end
inspect() click to toggle source
# File lib/nvlope/message_collection.rb, line 27
def inspect
  %(#<#{self.class} #{size}>)
end
to_a() click to toggle source
# File lib/nvlope/message_collection.rb, line 10
def to_a
  @to_a ||= raw['messages'].map do |raw|
    Nvlope::Message.new(nvlope, raw)
  end
end