Sha256: 8282f5c4cbf460ce6b63dc5850890bcfa7112bc212afd18e5a14fa2fe5a76c30

Contents?: true

Size: 418 Bytes

Versions: 14

Compression:

Stored size: 418 Bytes

Contents

module KB
  module Listable
    extend ActiveSupport::Concern

    included do
      include Queryable
    end

    module ClassMethods
      def all(filters = {})
        kb_client.all(filters).map do |pet_parent|
          from_api pet_parent
        end
      rescue Faraday::ConnectionFailed => e
        raise e
      rescue Faraday::Error => e
        raise KB::Error.from_faraday(e)
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
barkibu-kb-0.27.0 lib/kb/models/concerns/listable.rb
barkibu-kb-0.26.0 lib/kb/models/concerns/listable.rb
barkibu-kb-0.25.0 lib/kb/models/concerns/listable.rb
barkibu-kb-0.24.1 lib/kb/models/concerns/listable.rb
barkibu-kb-0.24.0 lib/kb/models/concerns/listable.rb
barkibu-kb-0.23.0 lib/kb/models/concerns/listable.rb
barkibu-kb-0.22.0 lib/kb/models/concerns/listable.rb
barkibu-kb-0.21.0 lib/kb/models/concerns/listable.rb
barkibu-kb-0.20.0 lib/kb/models/concerns/listable.rb
barkibu-kb-0.19.0 lib/kb/models/concerns/listable.rb
barkibu-kb-0.18.0 lib/kb/models/concerns/listable.rb
barkibu-kb-0.17.0 lib/kb/models/concerns/listable.rb
barkibu-kb-0.16.2 lib/kb/models/concerns/listable.rb
barkibu-kb-0.16.1 lib/kb/models/concerns/listable.rb