Class: HTTY::Preferences
- Inherits:
-
Object
- Object
- HTTY::Preferences
- Defined in:
- lib/htty/preferences.rb
Overview
Encapsulates htty user preferences.
Instance Attribute Summary collapse
-
#verify_certificates ⇒ Object
writeonly
Sets the boolean preference for whether server certificates are verified during HTTP Secure requests.
Class Method Summary collapse
-
.current ⇒ Object
Returns the instance of HTTY::Preferences holding current preferences.
Instance Method Summary collapse
-
#initialize ⇒ Preferences
constructor
Initializes a new HTTY::Preferences object.
-
#verify_certificates? ⇒ Boolean
Returns
true
if server certificates are verified during HTTP Secure requests.
Constructor Details
#initialize ⇒ Preferences
Initializes a new HTTY::Preferences object.
16 17 18 |
# File 'lib/htty/preferences.rb', line 16 def initialize @verify_certificates = true end |
Instance Attribute Details
#verify_certificates=(value) ⇒ Object (writeonly)
Sets the boolean preference for whether server certificates are verified during HTTP Secure requests.
13 14 15 |
# File 'lib/htty/preferences.rb', line 13 def verify_certificates=(value) @verify_certificates = value end |
Class Method Details
.current ⇒ Object
Returns the instance of HTTY::Preferences holding current preferences.
7 8 9 |
# File 'lib/htty/preferences.rb', line 7 def self.current @current ||= new end |
Instance Method Details
#verify_certificates? ⇒ Boolean
Returns true
if server certificates are verified during HTTP Secure requests.
22 23 24 |
# File 'lib/htty/preferences.rb', line 22 def verify_certificates? @verify_certificates end |