Class: Cloudflare::CustomHostname::SSLAttribute
- Inherits:
-
Object
- Object
- Cloudflare::CustomHostname::SSLAttribute
- Defined in:
- lib/cloudflare/custom_hostname/ssl_attribute.rb,
lib/cloudflare/custom_hostname/ssl_attribute/settings.rb
Defined Under Namespace
Classes: Settings
Instance Method Summary collapse
- #active? ⇒ Boolean
- #cname ⇒ Object
- #cname_target ⇒ Object
- #http_body ⇒ Object
- #http_url ⇒ Object
-
#initialize(params) ⇒ SSLAttribute
constructor
A new instance of SSLAttribute.
- #method ⇒ Object
- #pending_validation? ⇒ Boolean
-
#settings ⇒ Object
Wraps the settings hash if it exists or initializes the settings hash and then wraps it.
- #status ⇒ Object
- #to_h ⇒ Object
- #type ⇒ Object
- #validation_errors ⇒ Object
Constructor Details
#initialize(params) ⇒ SSLAttribute
Returns a new instance of SSLAttribute.
13 14 15 |
# File 'lib/cloudflare/custom_hostname/ssl_attribute.rb', line 13 def initialize(params) @params = params end |
Instance Method Details
#active? ⇒ Boolean
17 18 19 |
# File 'lib/cloudflare/custom_hostname/ssl_attribute.rb', line 17 def active? status == "active" end |
#cname ⇒ Object
21 22 23 |
# File 'lib/cloudflare/custom_hostname/ssl_attribute.rb', line 21 def cname @params[:cname] end |
#cname_target ⇒ Object
25 26 27 |
# File 'lib/cloudflare/custom_hostname/ssl_attribute.rb', line 25 def cname_target @params[:cname_target] end |
#http_body ⇒ Object
29 30 31 |
# File 'lib/cloudflare/custom_hostname/ssl_attribute.rb', line 29 def http_body @params[:http_body] end |
#http_url ⇒ Object
33 34 35 |
# File 'lib/cloudflare/custom_hostname/ssl_attribute.rb', line 33 def http_url @params[:http_url] end |
#method ⇒ Object
37 38 39 |
# File 'lib/cloudflare/custom_hostname/ssl_attribute.rb', line 37 def method @params[:method] end |
#pending_validation? ⇒ Boolean
41 42 43 |
# File 'lib/cloudflare/custom_hostname/ssl_attribute.rb', line 41 def pending_validation? status == "pending_validation" end |
#settings ⇒ Object
Wraps the settings hash if it exists or initializes the settings hash and then wraps it
46 47 48 |
# File 'lib/cloudflare/custom_hostname/ssl_attribute.rb', line 46 def settings @settings ||= Settings.new(@params[:settings] ||= {}) end |
#status ⇒ Object
50 51 52 |
# File 'lib/cloudflare/custom_hostname/ssl_attribute.rb', line 50 def status @params[:status] end |
#to_h ⇒ Object
54 55 56 |
# File 'lib/cloudflare/custom_hostname/ssl_attribute.rb', line 54 def to_h @params end |
#type ⇒ Object
58 59 60 |
# File 'lib/cloudflare/custom_hostname/ssl_attribute.rb', line 58 def type @params[:type] end |
#validation_errors ⇒ Object
62 63 64 |
# File 'lib/cloudflare/custom_hostname/ssl_attribute.rb', line 62 def validation_errors @params[:validation_errors] end |