Class: Grocer::Feedback

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/grocer/feedback.rb

Instance Method Summary collapse

Constructor Details

#initialize(connection) ⇒ Feedback

Returns a new instance of Feedback.



7
8
9
# File 'lib/grocer/feedback.rb', line 7

def initialize(connection)
  @connection = connection
end

Instance Method Details

#eachObject



11
12
13
14
15
# File 'lib/grocer/feedback.rb', line 11

def each
  while buf = @connection.read(FailedDeliveryAttempt::LENGTH)
    yield FailedDeliveryAttempt.new(buf)
  end
end