Class: Tinfoil::SecureHeader
- Inherits:
-
Object
- Object
- Tinfoil::SecureHeader
- Defined in:
- lib/tinfoil/secure_header.rb
Defined Under Namespace
Classes: Type
Instance Attribute Summary collapse
-
#exists ⇒ Object
Returns the value of attribute exists.
-
#ignore ⇒ Object
Returns the value of attribute ignore.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name) ⇒ SecureHeader
constructor
A new instance of SecureHeader.
- #status ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(name) ⇒ SecureHeader
Returns a new instance of SecureHeader.
13 14 15 16 17 |
# File 'lib/tinfoil/secure_header.rb', line 13 def initialize (name) @name = name @ignore = false @exists = false end |
Instance Attribute Details
#exists ⇒ Object
Returns the value of attribute exists.
11 12 13 |
# File 'lib/tinfoil/secure_header.rb', line 11 def exists @exists end |
#ignore ⇒ Object
Returns the value of attribute ignore.
11 12 13 |
# File 'lib/tinfoil/secure_header.rb', line 11 def ignore @ignore end |
#name ⇒ Object
Returns the value of attribute name.
11 12 13 |
# File 'lib/tinfoil/secure_header.rb', line 11 def name @name end |
Instance Method Details
#status ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/tinfoil/secure_header.rb', line 19 def status if @ignore "ignored" else if @exists "exists" else "missing" end end end |
#to_s ⇒ Object
31 32 33 |
# File 'lib/tinfoil/secure_header.rb', line 31 def to_s "#{@name}: #{status}" end |