Sha256: 077c184fcc60844f43de3f60ab5aeba8cc473eb3c4a21e3d9c79db9acf7800d0

Contents?: true

Size: 495 Bytes

Versions: 4

Compression:

Stored size: 495 Bytes

Contents

# Constructs urls for Poms
module Poms
  module Views
    extend self

    def by_group(mid)
      args = {
        key: "\"#{mid}\"",
        reduce: false,
        include_docs: true
      }
      construct_view_url('by-group', args)
    end

    private

    def base_url
      'http://docs.poms.omroep.nl'
    end

    def view_path
      '/media/_design/media/_view/'
    end

    def construct_view_url(view, args)
      "#{base_url}#{view_path}#{view}?#{args.to_query}"
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
poms-0.0.9 lib/poms/views.rb
poms-0.0.8 lib/poms/views.rb
poms-0.0.6 lib/poms/views.rb
poms-0.0.5 lib/poms/views.rb