lib/trav3/pagination.rb in trav3-0.1.1 vs lib/trav3/pagination.rb in trav3-0.2.0

- old
+ new

@@ -1,9 +1,10 @@ # frozen_string_literal: true module Trav3 class Pagination - def initialize(result) + def initialize(travis, result) + @travis = travis @result = result end def dig(opt) @result.dig(opt) @@ -20,10 +21,13 @@ def last get("#{API_ROOT}#{self.dig("@pagination").dig("last").dig("@href")}") end def get(x) - Trav3::GET.(x) + Trav3::GET.(travis, x) end private :get + + attr_reader :travis + private :travis end end