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