Class: Smplkit::Audit::ForwarderListPage
- Inherits:
-
Struct
- Object
- Struct
- Smplkit::Audit::ForwarderListPage
- Includes:
- Enumerable
- Defined in:
- lib/smplkit/audit/forwarders.rb
Overview
A single page returned from Smplkit::Audit::ForwardersClient#list.
Instance Attribute Summary collapse
-
#forwarders ⇒ Array<Smplkit::Audit::Forwarder>
Forwarders in this page.
-
#pagination ⇒ Hash
meta.paginationblock (:page,:size, and — only when the caller passed meta_total: true —:total/:total_pages).
Instance Method Summary collapse
- #each ⇒ Object
- #length ⇒ Object (also: #size)
Instance Attribute Details
#forwarders ⇒ Array<Smplkit::Audit::Forwarder>
Returns Forwarders in this page.
242 243 244 245 246 247 248 |
# File 'lib/smplkit/audit/forwarders.rb', line 242 ForwarderListPage = Struct.new(:forwarders, :pagination) do include Enumerable def each(&) = forwarders.each(&) def length = forwarders.length alias_method :size, :length end |
#pagination ⇒ Hash
Returns meta.pagination block (:page, :size, and — only when the caller passed meta_total: true — :total / :total_pages).
242 243 244 245 246 247 248 |
# File 'lib/smplkit/audit/forwarders.rb', line 242 ForwarderListPage = Struct.new(:forwarders, :pagination) do include Enumerable def each(&) = forwarders.each(&) def length = forwarders.length alias_method :size, :length end |
Instance Method Details
#each ⇒ Object
245 |
# File 'lib/smplkit/audit/forwarders.rb', line 245 def each(&) = forwarders.each(&) |
#length ⇒ Object Also known as: size
246 |
# File 'lib/smplkit/audit/forwarders.rb', line 246 def length = forwarders.length |