Class: Google::Compute::Data::SslCertSelfLinkRefCatalog
- Inherits:
-
SslCertSelfLinkRef
- Object
- SslCertSelfLinkRef
- Google::Compute::Data::SslCertSelfLinkRefCatalog
- Defined in:
- lib/google/compute/property/sslcertificate_selflink.rb
Overview
A class to fetch the resource value from a referenced block Will return the value exported from a different Puppet resource
Instance Method Summary collapse
-
#autorequires ⇒ Object
Puppet requires the title for autorequiring.
-
#initialize(title) ⇒ SslCertSelfLinkRefCatalog
constructor
A new instance of SslCertSelfLinkRefCatalog.
- #resource ⇒ Object
- #to_json(_arg = nil) ⇒ Object
- #to_s ⇒ Object
Methods inherited from SslCertSelfLinkRef
Constructor Details
#initialize(title) ⇒ SslCertSelfLinkRefCatalog
Returns a new instance of SslCertSelfLinkRefCatalog.
54 55 56 |
# File 'lib/google/compute/property/sslcertificate_selflink.rb', line 54 def initialize(title) @title = title end |
Instance Method Details
#autorequires ⇒ Object
Puppet requires the title for autorequiring
59 60 61 |
# File 'lib/google/compute/property/sslcertificate_selflink.rb', line 59 def autorequires [@title] end |
#resource ⇒ Object
72 73 74 75 76 77 78 |
# File 'lib/google/compute/property/sslcertificate_selflink.rb', line 72 def resource Google::ObjectStore.instance[:gcompute_ssl_certificate] .each do |entry| return entry.exports[:self_link] if entry.title == @title end raise ArgumentError, "gcompute_ssl_certificate[#{@title}] required" end |
#to_json(_arg = nil) ⇒ Object
67 68 69 70 |
# File 'lib/google/compute/property/sslcertificate_selflink.rb', line 67 def to_json(_arg = nil) return if resource.nil? resource.to_json end |
#to_s ⇒ Object
63 64 65 |
# File 'lib/google/compute/property/sslcertificate_selflink.rb', line 63 def to_s resource.to_s end |