lib/hcloud/multi_reply.rb in hcloud-0.1.1 vs lib/hcloud/multi_reply.rb in hcloud-0.1.2
- old
+ new
@@ -2,21 +2,20 @@
class MultiReply
include Enumerable
attr_accessor :cb
def initialize(j:, pagination: nil)
- @j = j
- @pagination = pagination
+ @j = j
+ @pagination = pagination
end
def pagination
- @pagination || Pagination.new(@j.first.to_h["meta"].to_h["pagination"], nil, nil)
+ @pagination || Pagination.new(@j.first.to_h['meta'].to_h['pagination'], nil, nil)
end
- def each(&block)
+ def each
@cb.call(@j).each do |member|
- block.call(member)
+ yield(member)
end
end
-
end
end