Sha256: 949e39f9641ab674c36ae2cd224bb273d889b49abfa7e6056c3883782567f7e4
Contents?: true
Size: 500 Bytes
Versions: 1
Compression:
Stored size: 500 Bytes
Contents
module Rapidash class Base include Urlable attr_accessor :url, :options, :client def initialize raise ConfigurationError.new "Missing URL attribute on the resource, set it by calling `url` in your resource class" end def call! self.options ||= {} self.options[:header] ||= {} self.options[:header]["content-type"] = "application/json" method = self.options.delete(:method) || :get client.send(method, url, self.options) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rapidash-0.0.1 | lib/rapidash/base.rb |