Class: KB::SearchResult

Inherits:
Object
  • Object
show all
Defined in:
lib/kb/models/search_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(elements:, total:, page:) ⇒ SearchResult

Returns a new instance of SearchResult.



5
6
7
8
9
# File 'lib/kb/models/search_result.rb', line 5

def initialize(elements:, total:, page:)
  @elements = elements
  @total = total
  @page = page
end

Instance Attribute Details

#elementsObject (readonly)

Returns the value of attribute elements.



3
4
5
# File 'lib/kb/models/search_result.rb', line 3

def elements
  @elements
end

#pageObject (readonly)

Returns the value of attribute page.



3
4
5
# File 'lib/kb/models/search_result.rb', line 3

def page
  @page
end

#totalObject (readonly)

Returns the value of attribute total.



3
4
5
# File 'lib/kb/models/search_result.rb', line 3

def total
  @total
end