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

- (Preferences) initialize

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

- (Object) verify_certificates=(value) (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

+ (Object) current

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

- (Boolean) verify_certificates?

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