Module: ActOn::Configurable

Included in:
ActOn
Defined in:
lib/act-on/configurable.rb

Constant Summary collapse

CONFIG_KEYS =
[
  :url,
  :access_token,
  :client_id,
  :client_secret,
  :username,
  :password,
]

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.keysObject



21
22
23
# File 'lib/act-on/configurable.rb', line 21

def keys
  @keys ||= CONFIG_KEYS
end

Instance Method Details

#client(options = {}) ⇒ ActOn::Client

Delegate to a ActOn::Client

Returns:



29
30
31
# File 'lib/act-on/configurable.rb', line 29

def client(options={})
  ::ActOn::Client.new(options)
end

#configure {|_self| ... } ⇒ Object

Convenience method to allow configuration options to be set in a block

Yields:

  • (_self)

Yield Parameters:



5
6
7
8
# File 'lib/act-on/configurable.rb', line 5

def configure
  yield self
  self
end