Class: HTTP::Security::Headers::Pragma
- Inherits:
-
Object
- Object
- HTTP::Security::Headers::Pragma
- Defined in:
- lib/http/security/headers/pragma.rb
Instance Method Summary collapse
-
#initialize(directives = {}) ⇒ Pragma
constructor
A new instance of Pragma.
- #no_cache? ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize(directives = {}) ⇒ Pragma
Returns a new instance of Pragma.
6 7 8 |
# File 'lib/http/security/headers/pragma.rb', line 6 def initialize(directives={}) @no_cache = directives[:no_cache] end |
Instance Method Details
#no_cache? ⇒ Boolean
10 11 12 |
# File 'lib/http/security/headers/pragma.rb', line 10 def no_cache? !!@no_cache end |
#to_s ⇒ Object
14 15 16 17 18 19 |
# File 'lib/http/security/headers/pragma.rb', line 14 def to_s str = '' str << 'no-cache' if @no_cache return str end |