Sha256: 3663a6d04d56a154d04844c487bfb685ae95839d1216debc47b8f1a1a6241e63
Contents?: true
Size: 523 Bytes
Versions: 3
Compression:
Stored size: 523 Bytes
Contents
module Headsail class API attr_reader :name, :timer, :method, :uri, :oauth def initialize(config) @name = config['name'] @timer = config['timer'] @oauth = config['oauth'] @method = config['request']['method'] @uri = build_uri(config['request']) end private def build_uri(request) return false if request.nil? uri_full = URI(request['uri']) uri_full.query = URI.encode_www_form(request['params']) if request['params'] uri_full end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
headsail-0.1.11 | lib/headsail/api.rb |
headsail-0.1.1 | lib/headsail/api.rb |
headsail-0.1.0 | lib/headsail/api.rb |