Class: Entrance::Agent::Certificate
- Extended by:
- Globalizer
- Defined in:
- lib/entrance/agent/certificate.rb
Instance Attribute Summary collapse
-
#certificate ⇒ Object
Returns the value of attribute certificate.
-
#key ⇒ Object
Returns the value of attribute key.
-
#name ⇒ Object
Returns the value of attribute name.
Attributes included from Globalizer
Attributes inherited from Restful
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Certificate
constructor
A new instance of Certificate.
- #path ⇒ Object
- #path=(path) ⇒ Object
- #to_s ⇒ Object
Methods inherited from Restful
Constructor Details
#initialize(params = {}) ⇒ Certificate
Returns a new instance of Certificate.
10 11 12 13 |
# File 'lib/entrance/agent/certificate.rb', line 10 def initialize params={} super params.merge(load:true) update_certificate_file end |
Instance Attribute Details
#certificate ⇒ Object
Returns the value of attribute certificate.
9 10 11 |
# File 'lib/entrance/agent/certificate.rb', line 9 def certificate @certificate end |
#key ⇒ Object
Returns the value of attribute key.
9 10 11 |
# File 'lib/entrance/agent/certificate.rb', line 9 def key @key end |
#name ⇒ Object
Returns the value of attribute name.
9 10 11 |
# File 'lib/entrance/agent/certificate.rb', line 9 def name @name end |
Instance Method Details
#path ⇒ Object
14 15 16 |
# File 'lib/entrance/agent/certificate.rb', line 14 def path @path ||= Config.current.workdir.join("#{@name}.pem").to_s end |
#path=(path) ⇒ Object
17 18 19 |
# File 'lib/entrance/agent/certificate.rb', line 17 def path=path @path = path end |
#to_s ⇒ Object
20 21 22 23 |
# File 'lib/entrance/agent/certificate.rb', line 20 def to_s update_certificate_file @path end |