Class: Sqreen::PayloadCreator::HeaderSection
- Inherits:
-
Object
- Object
- Sqreen::PayloadCreator::HeaderSection
- Defined in:
- lib/sqreen/payload_creator/header_section.rb
Overview
object that default to call on framework header
Instance Method Summary collapse
- #[](value) ⇒ Object
-
#initialize(framework) ⇒ HeaderSection
constructor
A new instance of HeaderSection.
- #ip_headers ⇒ Object
Constructor Details
#initialize(framework) ⇒ HeaderSection
Returns a new instance of HeaderSection.
14 15 16 |
# File 'lib/sqreen/payload_creator/header_section.rb', line 14 def initialize(framework) @framework = framework end |
Instance Method Details
#[](value) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/sqreen/payload_creator/header_section.rb', line 18 def [](value) if %w[rack_client_ip rails_client_ip ip_headers].include?(value) return @framework.send(value) end @framework.header(value) end |
#ip_headers ⇒ Object
25 26 27 |
# File 'lib/sqreen/payload_creator/header_section.rb', line 25 def ip_headers @framework.ip_headers end |