class GoogleSslCert::Name
Public Class Methods
new(options={})
click to toggle source
# File lib/google_ssl_cert/name.rb, line 5 def initialize(options={}) @options = options @append_type = @options[:append_type].nil? ? true : @options[:append_type] end
Public Instance Methods
base_name()
click to toggle source
# File lib/google_ssl_cert/name.rb, line 16 def base_name type = @options[:global] ? "global" : ENV['GOOGLE_REGION'] if @append_type [@options[:cert_name], type].compact.join('-') end
generated_name()
click to toggle source
# File lib/google_ssl_cert/name.rb, line 10 def generated_name ts = Time.now.strftime("%Y%m%d%H%M%S") unless @options[:timestamp] == false # nil defaults to true [base_name, ts].compact.join('-') end