Class: QuickbooksWebConnector::Configuration

Inherits:
Object
  • Object
show all
Includes:
ActiveSupport::Configurable
Defined in:
lib/quickbooks_web_connector/config.rb

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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_authenticateObject



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

#usersObject



49
50
51
# File 'lib/quickbooks_web_connector/config.rb', line 49

def users
  config.users
end