Sha256: a0db05cf437385628cdd0345837e67b5e376b09933296243a60f2ce120c2e81b

Contents?: true

Size: 570 Bytes

Versions: 2

Compression:

Stored size: 570 Bytes

Contents

module KindleManager
  class BaseAdapter
    include AmazonAuth::CommonExtension

    attr_accessor :store, :session, :options

    def initialize(options)
      @options = options
      @session = options.fetch(:session, nil)
      extend(AmazonAuth::SessionExtension)

      @store = KindleManager::FileStore.new(options.merge(session: @session))
      log "Directory for downloaded pages is #{store.base_dir}"
    end

    def limit
      options.fetch(:limit, nil)
    end

    def max_scroll_attempts
      options.fetch(:max_scroll_attempts, 20)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
kindle_manager-0.4.0 lib/kindle_manager/adapters/base_adapter.rb
kindle_manager-0.3.0 lib/kindle_manager/adapters/base_adapter.rb