Class: Tinypass::Gateway::PagedList
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- Tinypass::Gateway::PagedList
- Includes:
- Enumerable
- Defined in:
- lib/tinypass/gateway.rb
Instance Method Summary collapse
- #each(&block) ⇒ Object
-
#initialize(parsed_response) ⇒ PagedList
constructor
A new instance of PagedList.
Constructor Details
#initialize(parsed_response) ⇒ PagedList
Returns a new instance of PagedList.
88 89 90 91 92 93 94 95 96 97 |
# File 'lib/tinypass/gateway.rb', line 88 def initialize(parsed_response) @list = [] raw_access_details = parsed_response.delete('data') raw_access_details.each do |d| @list << AccessDetails.new(d) end super(parsed_response) end |
Instance Method Details
#each(&block) ⇒ Object
99 100 101 |
# File 'lib/tinypass/gateway.rb', line 99 def each(&block) @list.each(&block) end |