lib/Mollie/API/Object/List.rb in mollie-api-ruby-1.1.2 vs lib/Mollie/API/Object/List.rb in mollie-api-ruby-1.1.3
- old
+ new
@@ -1,35 +1,35 @@
module Mollie
- module API
- module Object
- class List < Base
- include Enumerable
+ module API
+ module Object
+ class List < Base
+ include Enumerable
- attr_accessor :totalCount,
- :offset,
- :count,
- :data
+ attr_accessor :totalCount,
+ :offset,
+ :count,
+ :data
- def initialize (hash, classResourceObject)
- data = hash[:data] || []
- hash[:data] = nil
- super hash
+ def initialize(hash, classResourceObject)
+ data = hash[:data] || []
+ hash[:data] = nil
+ super hash
- @data = []
- data.each { |hash|
- @data << (classResourceObject.new hash)
- }
- end
+ @data = []
+ data.each { |hash|
+ @data << (classResourceObject.new hash)
+ }
+ end
- def each (&block)
- @data.each { |object|
- if block_given?
- block.call object
- else
- yield object
- end
- }
- end
- end
- end
- end
-end
\ No newline at end of file
+ def each(&block)
+ @data.each { |object|
+ if block_given?
+ block.call object
+ else
+ yield object
+ end
+ }
+ end
+ end
+ end
+ end
+end