Class: Pwnix::Api::Client::Config
- Inherits:
-
ConfigFile
- Object
- ConfigFile
- Pwnix::Api::Client::Config
- Includes:
- Singleton
- Defined in:
- lib/pwnix-api-client/api_client.rb
Instance Method Summary collapse
- #[](key) ⇒ Object
- #base_uri ⇒ Object
- #debug_mode ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
Methods inherited from ConfigFile
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
14 15 16 17 |
# File 'lib/pwnix-api-client/api_client.rb', line 14 def initialize @config_file = "/opt/pwnix/pwnix-config/pwnix-ui/config.json" read end |
Instance Method Details
#[](key) ⇒ Object
27 28 29 |
# File 'lib/pwnix-api-client/api_client.rb', line 27 def [](key) @config_hash[key] end |
#base_uri ⇒ Object
19 20 21 |
# File 'lib/pwnix-api-client/api_client.rb', line 19 def base_uri @config_hash['api_uri'] end |
#debug_mode ⇒ Object
23 24 25 |
# File 'lib/pwnix-api-client/api_client.rb', line 23 def debug_mode @config_hash['debug_mode'] end |