Class: HerokuDnsimpleCert::HerokuCertificate
- Inherits:
-
Object
- Object
- HerokuDnsimpleCert::HerokuCertificate
- Defined in:
- lib/heroku_dnsimple_cert/heroku_certificate.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
readonly
Returns the value of attribute app.
-
#certificate_chain ⇒ Object
readonly
Returns the value of attribute certificate_chain.
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#private_key ⇒ Object
readonly
Returns the value of attribute private_key.
Instance Method Summary collapse
- #certificates ⇒ Object
- #create ⇒ Object
-
#initialize(token:, app:, certificate_chain:, private_key:, client: nil) ⇒ HerokuCertificate
constructor
A new instance of HerokuCertificate.
- #update ⇒ Object
Constructor Details
#initialize(token:, app:, certificate_chain:, private_key:, client: nil) ⇒ HerokuCertificate
Returns a new instance of HerokuCertificate.
5 6 7 8 9 10 |
# File 'lib/heroku_dnsimple_cert/heroku_certificate.rb', line 5 def initialize(token:, app:, certificate_chain:, private_key:, client: nil) @client = client || HerokuSni.new(token, app) @certificate_chain = certificate_chain @private_key = private_key @app = app end |
Instance Attribute Details
#app ⇒ Object (readonly)
Returns the value of attribute app.
3 4 5 |
# File 'lib/heroku_dnsimple_cert/heroku_certificate.rb', line 3 def app @app end |
#certificate_chain ⇒ Object (readonly)
Returns the value of attribute certificate_chain.
3 4 5 |
# File 'lib/heroku_dnsimple_cert/heroku_certificate.rb', line 3 def certificate_chain @certificate_chain end |
#client ⇒ Object (readonly)
Returns the value of attribute client.
3 4 5 |
# File 'lib/heroku_dnsimple_cert/heroku_certificate.rb', line 3 def client @client end |
#private_key ⇒ Object (readonly)
Returns the value of attribute private_key.
3 4 5 |
# File 'lib/heroku_dnsimple_cert/heroku_certificate.rb', line 3 def private_key @private_key end |
Instance Method Details
#certificates ⇒ Object
12 13 14 |
# File 'lib/heroku_dnsimple_cert/heroku_certificate.rb', line 12 def certificates @certificates ||= client.list end |
#create ⇒ Object
20 21 22 |
# File 'lib/heroku_dnsimple_cert/heroku_certificate.rb', line 20 def create client.create() end |
#update ⇒ Object
16 17 18 |
# File 'lib/heroku_dnsimple_cert/heroku_certificate.rb', line 16 def update client.update(certificates[0]["name"], ) end |