Class: QuickbooksWebConnector::Configuration
- Inherits:
-
Object
- Object
- QuickbooksWebConnector::Configuration
- Includes:
- ActiveSupport::Configurable
- Defined in:
- lib/quickbooks_web_connector/config.rb
Instance Method Summary collapse
- #after_authenticate(&block) ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #run_after_authenticate ⇒ Object
- #user(username, *args) ⇒ Object
- #users ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
45 46 47 |
# File 'lib/quickbooks_web_connector/config.rb', line 45 def initialize config.users = {} end |
Instance Method Details
#after_authenticate(&block) ⇒ Object
59 60 61 |
# File 'lib/quickbooks_web_connector/config.rb', line 59 def after_authenticate(&block) @after_authenticate = block end |
#run_after_authenticate ⇒ Object
63 64 65 |
# File 'lib/quickbooks_web_connector/config.rb', line 63 def run_after_authenticate @after_authenticate.call if @after_authenticate end |
#user(username, *args) ⇒ Object
53 54 55 56 57 |
# File 'lib/quickbooks_web_connector/config.rb', line 53 def user(username, *args) username = username.to_s config.users[username] = User.new(username, *args) end |
#users ⇒ Object
49 50 51 |
# File 'lib/quickbooks_web_connector/config.rb', line 49 def users config.users end |