Class: SSLCheck::Check
- Inherits:
-
Object
- Object
- SSLCheck::Check
- Defined in:
- lib/sslcheck/check.rb
Instance Attribute Summary collapse
-
#ca_bundle ⇒ Object
Returns the value of attribute ca_bundle.
-
#host_name ⇒ Object
Returns the value of attribute host_name.
-
#peer_cert ⇒ Object
Returns the value of attribute peer_cert.
Instance Method Summary collapse
- #check(url) ⇒ Object
- #checked? ⇒ Boolean
- #errors ⇒ Object
- #failed? ⇒ Boolean
-
#initialize(client = nil, validator = nil) ⇒ Check
constructor
A new instance of Check.
- #url ⇒ Object
- #valid? ⇒ Boolean
Constructor Details
Instance Attribute Details
#ca_bundle ⇒ Object
Returns the value of attribute ca_bundle.
3 4 5 |
# File 'lib/sslcheck/check.rb', line 3 def ca_bundle @ca_bundle end |
#host_name ⇒ Object
Returns the value of attribute host_name.
3 4 5 |
# File 'lib/sslcheck/check.rb', line 3 def host_name @host_name end |
#peer_cert ⇒ Object
Returns the value of attribute peer_cert.
3 4 5 |
# File 'lib/sslcheck/check.rb', line 3 def peer_cert @peer_cert end |
Instance Method Details
#check(url) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/sslcheck/check.rb', line 11 def check(url) fetch(url) validate if no_errors? @checked = true @url = url return self end |
#checked? ⇒ Boolean
33 34 35 36 |
# File 'lib/sslcheck/check.rb', line 33 def checked? return true if @checked false end |
#errors ⇒ Object
19 20 21 |
# File 'lib/sslcheck/check.rb', line 19 def errors @errors end |
#failed? ⇒ Boolean
23 24 25 26 |
# File 'lib/sslcheck/check.rb', line 23 def failed? return false if no_errors? true end |
#url ⇒ Object
38 39 40 |
# File 'lib/sslcheck/check.rb', line 38 def url @url end |
#valid? ⇒ Boolean
28 29 30 31 |
# File 'lib/sslcheck/check.rb', line 28 def valid? return true if no_errors? && checked? false end |