Class: Jets::Cfn::Builder::Api::Pages::Page

Inherits:
Object
  • Object
show all
Defined in:
lib/jets/cfn/builder/api/pages/page.rb

Overview

Note: Do not use, it behaves differently in Ruby 2 v Ruby 3 Page = Struct.new(:items, :number)

In Ruby 2, assigning an Array to items creates an extra :items key in the structure

#<struct Page items={:items=>["*catchall", "posts"],

In Ruby 3, assigning an Array to items.

#<struct Page items=["*catchall", "posts"], number=1>

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(items:, number:) ⇒ Page

Returns a new instance of Page.



15
16
17
# File 'lib/jets/cfn/builder/api/pages/page.rb', line 15

def initialize(items:, number:)
  @items, @number = items, number
end

Instance Attribute Details

#itemsObject

Returns the value of attribute items.



14
15
16
# File 'lib/jets/cfn/builder/api/pages/page.rb', line 14

def items
  @items
end

#numberObject

Returns the value of attribute number.



14
15
16
# File 'lib/jets/cfn/builder/api/pages/page.rb', line 14

def number
  @number
end