Class: Sapphire::Configuration::AppConfig
- Defined in:
- lib/sapphire/Configuration/AppConfig.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.create(hash) ⇒ Object
7 8 9 10 |
# File 'lib/sapphire/Configuration/AppConfig.rb', line 7 def self.create(hash) @@instance ||= AppConfig.new hash @@instance end |
.Current ⇒ Object
12 13 14 |
# File 'lib/sapphire/Configuration/AppConfig.rb', line 12 def self.Current @@instance if $config end |
Instance Method Details
#Browser ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/sapphire/Configuration/AppConfig.rb', line 16 def Browser case(ENV["browser"] || $config["Browser"]) when "Firefox" then FireFoxBrowser.new when "Chrome" then ChromeBrowser.new when "IE" then InternetExplorerBrowser.new end end |
#ConfiguredBrowser ⇒ Object
24 25 26 |
# File 'lib/sapphire/Configuration/AppConfig.rb', line 24 def ConfiguredBrowser ENV["browser"] || $config["Browser"] end |