Module: Elibom
- Defined in:
- lib/elibom.rb,
lib/elibom/client.rb
Overview
Ruby client of the Elibom API
Defined Under Namespace
Classes: Client
Class Method Summary collapse
- .configure(options = {}) ⇒ Object
- .method_missing(method_name, *args, &block) ⇒ Object
- .reset! ⇒ Object
- .respond_to_missing?(method_name, include_private = false) ⇒ Boolean
Class Method Details
.configure(options = {}) ⇒ Object
9 10 11 |
# File 'lib/elibom.rb', line 9 def configure(={}) @client = Elibom::Client.new() end |
.method_missing(method_name, *args, &block) ⇒ Object
13 14 15 16 |
# File 'lib/elibom.rb', line 13 def method_missing(method_name, *args, &block) raise RuntimeError, "Please call Elibom.configure(:user => '...', :api_password => '...') first" if @client.nil? @client.send(method_name, *args, &block) end |
.reset! ⇒ Object
23 24 25 |
# File 'lib/elibom.rb', line 23 def reset! @client = nil end |
.respond_to_missing?(method_name, include_private = false) ⇒ Boolean
18 19 20 21 |
# File 'lib/elibom.rb', line 18 def respond_to_missing?(method_name, include_private=false) raise RuntimeError, "Please call Elibom.configure(:user => '...', :api_password => '...') first" if @client.nil? @client.respond_to?(method_name, include_private) end |