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
7 8 9 |
# File 'lib/elibom.rb', line 7 def configure(={}) @client = Elibom::Client.new() end |
.method_missing(method_name, *args, &block) ⇒ Object
11 12 13 14 |
# File 'lib/elibom.rb', line 11 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
21 22 23 |
# File 'lib/elibom.rb', line 21 def reset! @client = nil end |
.respond_to_missing?(method_name, include_private = false) ⇒ Boolean
16 17 18 19 |
# File 'lib/elibom.rb', line 16 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 |