Created
September 14, 2011 14:13
-
-
Save mokevnin/1216662 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Gateways | |
@@class_name = :production | |
def self.class_name=(v) | |
@@class_name = v | |
end | |
#TODO автоматически для всех шлюзов | |
def self.ipgeobase | |
unless @ipgeobase | |
full_class_name = "Gateways::Ipgeobase::#{@@class_name.to_s.capitalize}" | |
@ipgeobase ||= full_class_name.constantize.new | |
end | |
@ipgeobase | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment