Class: FentonShell::ConfigFile
- Inherits:
-
Object
- Object
- FentonShell::ConfigFile
- Defined in:
- lib/fenton_shell/config_file.rb
Overview
Provides a local configuration file
Instance Attribute Summary collapse
-
#message ⇒ String
Success or failure message and why.
Class Method Summary collapse
-
.default_organization(global_options) ⇒ String
Responds with the default organization.
-
.public_key(global_options) ⇒ String
Responds with the default public key.
-
.username(global_options) ⇒ String
Responds with the default username.
Instance Method Summary collapse
-
#create(global_options, options) ⇒ String
Creates a configuration file on the local file system.
Instance Attribute Details
#message ⇒ String
Returns success or failure message and why.
6 7 8 |
# File 'lib/fenton_shell/config_file.rb', line 6 def end |
Class Method Details
.default_organization(global_options) ⇒ String
Responds with the default organization
31 32 33 |
# File 'lib/fenton_shell/config_file.rb', line 31 def default_organization() config_file()[:default_organization] end |
.public_key(global_options) ⇒ String
Responds with the default public key
47 48 49 |
# File 'lib/fenton_shell/config_file.rb', line 47 def public_key() config_file()[:public_key] end |
.username(global_options) ⇒ String
Responds with the default username
39 40 41 |
# File 'lib/fenton_shell/config_file.rb', line 39 def username() config_file()[:username] end |
Instance Method Details
#create(global_options, options) ⇒ String
Creates a configuration file on the local file system
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/fenton_shell/config_file.rb', line 14 def create(, ) status, body = config_file_create(, ) if status ('ConfigFile': ['created!']) true else (body) false end end |