Sha256: e7215dd16fe8a3e48393cdc9dba0bc6353770603d7bf45bc83066db24ecff73a

Contents?: true

Size: 374 Bytes

Versions: 4

Compression:

Stored size: 374 Bytes

Contents

module Patronage
  class Service
    attr_reader :name
  
    def initialize(api, name)
      @api  = api
      @name = name.to_s
    end
  
    def service_location
      "/#{name}"
    end
  
    def get(params)
      uri              = Addressable::URI.parse(service_location)
      uri.query_values = params      
      Response.new(@api.get(uri.to_s))
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
divoxx-patronage-0.0.1 lib/patronage/service.rb
divoxx-patronage-0.0.2 lib/patronage/service.rb
divoxx-patronage-0.0.3 lib/patronage/service.rb
divoxx-patronage-0.0.4 lib/patronage/service.rb