Class: Apisync
- Inherits:
-
Object
- Object
- Apisync
- Defined in:
- lib/apisync.rb,
lib/apisync/version.rb,
lib/apisync/http/url.rb,
lib/apisync/resource.rb,
lib/apisync/exceptions.rb,
lib/apisync/http_client.rb,
lib/apisync/http/query_string.rb
Defined Under Namespace
Modules: Http Classes: Exception, HttpClient, InvalidFilter, Resource, TooManyRequests, UrlAndPayloadIdMismatch
Constant Summary collapse
- VERSION =
"0.1.5"- @@api_key =
nil- @@host =
nil
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(api_key: nil) ⇒ Apisync
constructor
A new instance of Apisync.
- #method_missing(name, args = {}, &block) ⇒ Object
Constructor Details
#initialize(api_key: nil) ⇒ Apisync
Returns a new instance of Apisync.
15 16 17 18 19 20 |
# File 'lib/apisync.rb', line 15 def initialize(api_key: nil) @api_key = api_key || @@api_key @host = @@host raise ArgumentError, "missing keyword: api_key" if @api_key.nil? end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
Class Method Details
.api_key=(value) ⇒ Object
34 35 36 |
# File 'lib/apisync.rb', line 34 def self.api_key=(value) @@api_key = value end |
.host=(value) ⇒ Object
30 31 32 |
# File 'lib/apisync.rb', line 30 def self.host=(value) @@host = host end |