Class: Mailkube::PageSteps

Inherits:
Object
  • Object
show all
Defined in:
lib/mailkube/types/scheduled_emails.rb,
sig/mailkube/types/scheduled_emails.rbs

Overview

Links to the pages adjacent to the one in hand.

The server omits a step at either end of the range rather than sending null, so an absent link and a nil value mean the same thing: there is no such page.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(next: nil, previous: nil) ⇒ PageSteps

Returns a new instance of PageSteps.

Parameters:

  • next (String, nil) (defaults to: nil)

    absolute URL of the following page, nil on the last page.

  • previous (String, nil) (defaults to: nil)

    absolute URL of the preceding page, nil on the first page.

  • next: (String, nil) (defaults to: nil)
  • previous: (String, nil) (defaults to: nil)


51
# File 'lib/mailkube/types/scheduled_emails.rb', line 51

def initialize(next: nil, previous: nil) = super

Instance Attribute Details

#previousString? (readonly)

Returns the value of attribute previous.

Returns:

  • (String, nil)


30
31
32
# File 'sig/mailkube/types/scheduled_emails.rbs', line 30

def previous
  @previous
end

Class Method Details

.from(payload) ⇒ PageSteps

Returns the model.

Parameters:

  • payload (Hash{String => Object}, nil)

    the decoded steps block, which may be absent.

  • (Hash[String, untyped], nil)

Returns:



55
# File 'lib/mailkube/types/scheduled_emails.rb', line 55

def self.from(payload) = new(next: (payload || {})["next"], previous: (payload || {})["previous"])

Instance Method Details

#nextString?

Declared as def rather than attr_reader only because next is a Ruby keyword: RBS's own core signatures spell this member def next: and use no keyword-named attr_reader anywhere. previous keeps the house form. Both are Data.define readers, and MethodDefinitionMissing is off in the Steepfile for exactly that reason.

Returns:

  • (String, nil)


29
# File 'sig/mailkube/types/scheduled_emails.rbs', line 29

def next: () -> String?