Class: ApiBee::Config

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/api_bee.rb

Instance Method Summary collapse

Instance Method Details

#expose(*fields) ⇒ Object

Delegate method calls to your wrapped adapter

Example:

api = ApiBee.setup(TwitterAdapter) do |config|
  config.expose :post_message, :delete_message
end

Now calls to api.post_message and api.delete_message will be delegated to an instance of TwitterAdapter



81
82
83
# File 'lib/api_bee.rb', line 81

def expose(*fields)
  self.adapter_delegators = fields
end