Class: HTTY::Preferences

Inherits:
Object
  • Object
show all
Defined in:
lib/htty/preferences.rb

Overview

Encapsulates htty user preferences.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePreferences

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

.currentObject

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.

Returns:

  • (Boolean)


22
23
24
# File 'lib/htty/preferences.rb', line 22

def verify_certificates?
  @verify_certificates
end