Class: Aikido::Zen::AttackWave::Request
- Inherits:
-
Object
- Object
- Aikido::Zen::AttackWave::Request
- Defined in:
- lib/aikido/zen/attack_wave.rb
Instance Attribute Summary collapse
- #ip_address ⇒ String readonly
- #source ⇒ String readonly
- #user_agent ⇒ String readonly
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #as_json ⇒ Object
- #initialize(ip_address:, user_agent:, source:) ⇒ Aikido::Zen::AttackWave::Request constructor
Constructor Details
#initialize(ip_address:, user_agent:, source:) ⇒ Aikido::Zen::AttackWave::Request
64 65 66 67 68 |
# File 'lib/aikido/zen/attack_wave.rb', line 64 def initialize(ip_address:, user_agent:, source:) @ip_address = ip_address @user_agent = user_agent @source = source end |
Instance Attribute Details
#ip_address ⇒ String (readonly)
52 53 54 |
# File 'lib/aikido/zen/attack_wave.rb', line 52 def ip_address @ip_address end |
#source ⇒ String (readonly)
58 59 60 |
# File 'lib/aikido/zen/attack_wave.rb', line 58 def source @source end |
#user_agent ⇒ String (readonly)
55 56 57 |
# File 'lib/aikido/zen/attack_wave.rb', line 55 def user_agent @user_agent end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
78 79 80 81 82 83 |
# File 'lib/aikido/zen/attack_wave.rb', line 78 def ==(other) other.is_a?(self.class) && other.ip_address == ip_address && other.user_agent == user_agent && other.source == source end |
#as_json ⇒ Object
70 71 72 73 74 75 76 |
# File 'lib/aikido/zen/attack_wave.rb', line 70 def as_json { ipAddress: @ip_address, userAgent: @user_agent, source: @source }.compact end |