class AmazonSellerCentral::Page
Constants
- AZN_DATE_FMT
Attributes
body[RW]
Public Class Methods
new(options={})
click to toggle source
# File lib/amazon_seller_central/page.rb, line 5 def initialize(options={}) @page = options.delete(:page) @agent = options.delete(:agent) @body = @page ? @page.body : "" end
Public Instance Methods
has_next?()
click to toggle source
# File lib/amazon_seller_central/page.rb, line 11 def has_next? false end
last_page?()
click to toggle source
# File lib/amazon_seller_central/page.rb, line 15 def last_page? !has_next? end
next_page()
click to toggle source
# File lib/amazon_seller_central/page.rb, line 19 def next_page raise NoNextPageAvailableError.new("Unimplemented, override Page#next_page") end
Protected Instance Methods
parse_amazon_date(string)
click to toggle source
# File lib/amazon_seller_central/page.rb, line 32 def parse_amazon_date(string) Time.strptime(string, AZN_DATE_FMT) end
parse_amazon_time(string)
click to toggle source
# File lib/amazon_seller_central/page.rb, line 28 def parse_amazon_time(string) Time.strptime(string, "#{AZN_DATE_FMT} %H:%M:%S") end