Class: URI::Paged
- Inherits:
-
Object
- Object
- URI::Paged
- Defined in:
- lib/w-stdlib/uri.rb
Instance Method Summary collapse
- #get ⇒ Object
-
#initialize(url, start = 1, name = 'page') ⇒ Paged
constructor
A new instance of Paged.
Constructor Details
#initialize(url, start = 1, name = 'page') ⇒ Paged
Returns a new instance of Paged.
4 5 6 7 8 |
# File 'lib/w-stdlib/uri.rb', line 4 def initialize(url, start=1, name='page') @url = url @start = start @name = name end |
Instance Method Details
#get ⇒ Object
10 11 12 13 14 |
# File 'lib/w-stdlib/uri.rb', line 10 def get @url.with_query_params { _1[@name] = @start } @start += 1 @url end |