Class: PageMeta

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
app/roles/page_meta.rb

Overview

Decorates the given object with #page_meta attribute.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object, limit:, offset:, count:) ⇒ Object


14
15
16
17
18
19
20
21
# File 'app/roles/page_meta.rb', line 14

def initialize(object, limit:, offset:, count:)
  super object
  @page_meta = {
    limit: limit,
    offset: offset,
    count: count,
  }
end

Instance Attribute Details

#page_metaObject (readonly)

Returns the value of attribute page_meta


5
6
7
# File 'app/roles/page_meta.rb', line 5

def page_meta
  @page_meta
end