Module: Hexabat::PageRange

Defined in:
lib/hexabat/page_range.rb

Defined Under Namespace

Classes: LinkHeader

Class Method Summary collapse

Class Method Details

.from(headers) ⇒ Object



5
6
7
8
# File 'lib/hexabat/page_range.rb', line 5

def self.from(headers)
  return SinglePageRange.new(1) unless headers.has_key? 'LINK'
  return MultiplePageRange.new(1, LinkHeader.new(headers['LINK']).last)
end