Class: Digicert::CLI::RCFile
- Inherits:
-
Object
- Object
- Digicert::CLI::RCFile
- Includes:
- Singleton
- Defined in:
- lib/digicert/cli/rcfile.rb
Constant Summary collapse
- FILE_NAME =
".digicertrc".freeze
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ RCFile
constructor
A new instance of RCFile.
- #set_key(api_key) ⇒ Object
Constructor Details
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
8 9 10 |
# File 'lib/digicert/cli/rcfile.rb', line 8 def data @data end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
8 9 10 |
# File 'lib/digicert/cli/rcfile.rb', line 8 def path @path end |
Class Method Details
.api_key ⇒ Object
21 22 23 |
# File 'lib/digicert/cli/rcfile.rb', line 21 def self.api_key new.data[:api_key] end |
.set_key(api_key) ⇒ Object
25 26 27 |
# File 'lib/digicert/cli/rcfile.rb', line 25 def self.set_key(api_key) new.set_key(api_key) end |
Instance Method Details
#set_key(api_key) ⇒ Object
16 17 18 19 |
# File 'lib/digicert/cli/rcfile.rb', line 16 def set_key(api_key) data[:api_key] = api_key write_api_key_to_file end |