Class: Smplkit::Audit::ForwarderListPage

Inherits:
Struct
  • Object
show all
Includes:
Enumerable
Defined in:
lib/smplkit/audit/forwarders.rb

Overview

A single page returned from Smplkit::Audit::ForwardersClient#list.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#forwardersArray<Smplkit::Audit::Forwarder>

Returns Forwarders in this page.

Returns:



231
232
233
234
235
236
237
# File 'lib/smplkit/audit/forwarders.rb', line 231

ForwarderListPage = Struct.new(:forwarders, :pagination) do
  include Enumerable

  def each(&) = forwarders.each(&)
  def length = forwarders.length
  alias_method :size, :length
end

#paginationHash

Returns meta.pagination block (:page, :size, and — only when the caller passed meta_total: true:total / :total_pages).

Returns:

  • (Hash)

    meta.pagination block (:page, :size, and — only when the caller passed meta_total: true:total / :total_pages).



231
232
233
234
235
236
237
# File 'lib/smplkit/audit/forwarders.rb', line 231

ForwarderListPage = Struct.new(:forwarders, :pagination) do
  include Enumerable

  def each(&) = forwarders.each(&)
  def length = forwarders.length
  alias_method :size, :length
end

Instance Method Details

#eachObject



234
# File 'lib/smplkit/audit/forwarders.rb', line 234

def each(&) = forwarders.each(&)

#lengthObject Also known as: size



235
# File 'lib/smplkit/audit/forwarders.rb', line 235

def length = forwarders.length