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.
8 9 10 |
# File 'lib/cloudflare/custom_hostname/ssl_attribute.rb', line 8 def initialize(params) @params = params end |
Instance Method Details
#active? ⇒ Boolean
12 13 14 |
# File 'lib/cloudflare/custom_hostname/ssl_attribute.rb', line 12 def active? status == 'active' end |
#cname ⇒ Object
16 17 18 |
# File 'lib/cloudflare/custom_hostname/ssl_attribute.rb', line 16 def cname @params[:cname] end |
#cname_target ⇒ Object
20 21 22 |
# File 'lib/cloudflare/custom_hostname/ssl_attribute.rb', line 20 def cname_target @params[:cname_target] end |
#http_body ⇒ Object
24 25 26 |
# File 'lib/cloudflare/custom_hostname/ssl_attribute.rb', line 24 def http_body @params[:http_body] end |
#http_url ⇒ Object
28 29 30 |
# File 'lib/cloudflare/custom_hostname/ssl_attribute.rb', line 28 def http_url @params[:http_url] end |
#method ⇒ Object
32 33 34 |
# File 'lib/cloudflare/custom_hostname/ssl_attribute.rb', line 32 def method @params[:method] end |
#pending_validation? ⇒ Boolean
36 37 38 |
# File 'lib/cloudflare/custom_hostname/ssl_attribute.rb', line 36 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
41 42 43 |
# File 'lib/cloudflare/custom_hostname/ssl_attribute.rb', line 41 def settings @settings ||= Settings.new(@params[:settings] ||= {}) end |
#status ⇒ Object
45 46 47 |
# File 'lib/cloudflare/custom_hostname/ssl_attribute.rb', line 45 def status @params[:status] end |
#to_h ⇒ Object
49 50 51 |
# File 'lib/cloudflare/custom_hostname/ssl_attribute.rb', line 49 def to_h @params end |
#type ⇒ Object
53 54 55 |
# File 'lib/cloudflare/custom_hostname/ssl_attribute.rb', line 53 def type @params[:type] end |
#validation_errors ⇒ Object
57 58 59 |
# File 'lib/cloudflare/custom_hostname/ssl_attribute.rb', line 57 def validation_errors @params[:validation_errors] end |