Class: Metaforce::AbstractClient

Inherits:
Object
  • Object
show all
Defined in:
lib/metaforce/abstract_client.rb

Direct Known Subclasses

Metadata::Client, Services::Client

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ AbstractClient

Public: Initialize a new client.

options - A hash of options, which should have a :session_id key



18
19
20
21
# File 'lib/metaforce/abstract_client.rb', line 18

def initialize(options={})
  raise 'Please specify a hash of options' unless options.is_a?(Hash)
  @options = options
end

Class Method Details

.endpoint(key) ⇒ Object

Internal



5
6
7
# File 'lib/metaforce/abstract_client.rb', line 5

def endpoint(key)
  define_method :endpoint do; @options[key] end
end

.wsdl(wsdl) ⇒ Object

Internal



10
11
12
# File 'lib/metaforce/abstract_client.rb', line 10

def wsdl(wsdl)
  define_method :wsdl do; wsdl end
end