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:



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

#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).



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

#eachObject



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

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

#lengthObject Also known as: size



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

def length = forwarders.length