Commit e690a542 authored by Sergey Gernyak's avatar Sergey Gernyak

Make am and asm method instead attributes

parent 45211b1c
......@@ -175,11 +175,19 @@ module BetfairApiNgRails
extend Api::RequestMethods::All
class << self
attr_accessor :log, :account_manager, :account_session_manager
attr_accessor :log
end
def self.config(&block)
@_config ||= BetfairApiNgRails::Api::Config
block_given? ? yield(@_config) : @_config
end
def self.account_manager
BetfairApiNgRails::AccountManager.instance
end
def self.account_session_manager
BetfairApiNgRails::AccountSessionManager.instance
end
end
......@@ -2,8 +2,6 @@ module BetfairApiNgRails
class Railtie < Rails::Railtie
config.after_initialize do
BetfairApiNgRails.log = BetfairApiNgRails::Api::Logs::FileLogger.new Rails.root, Rails.env
BetfairApiNgRails.account_manager = BetfairApiNgRails::AccountManager.instance
BetfairApiNgRails.account_session_manager = BetfairApiNgRails::AccountSessionManager.instance
end
console do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment