Class: AmazonSellerCentral::Page
- Inherits:
-
Object
- Object
- AmazonSellerCentral::Page
- Defined in:
- lib/amazon_seller_central/page.rb
Direct Known Subclasses
Defined Under Namespace
Classes: NoNextPageAvailableError
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
Instance Method Summary collapse
- #has_next? ⇒ Boolean
-
#initialize(options = {}) ⇒ Page
constructor
A new instance of Page.
- #last_page? ⇒ Boolean
- #next_page ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Page
Returns a new instance of Page.
5 6 7 8 9 |
# File 'lib/amazon_seller_central/page.rb', line 5 def initialize(={}) @page = .delete(:page) @agent = .delete(:agent) @body = @page ? @page.body : "" end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
3 4 5 |
# File 'lib/amazon_seller_central/page.rb', line 3 def body @body end |
Instance Method Details
#has_next? ⇒ Boolean
11 12 13 |
# File 'lib/amazon_seller_central/page.rb', line 11 def has_next? false end |
#last_page? ⇒ Boolean
15 16 17 |
# File 'lib/amazon_seller_central/page.rb', line 15 def last_page? !has_next? end |
#next_page ⇒ Object
19 20 21 |
# File 'lib/amazon_seller_central/page.rb', line 19 def next_page raise NoNextPageAvailableError.new("Unimplemented, override Page#next_page") end |