Class: Datadog::AppSec::WAF::Result
- Inherits:
-
Object
- Object
- Datadog::AppSec::WAF::Result
- Defined in:
- lib/datadog/appsec/waf/result.rb
Overview
Ruby representation of the ddwaf_result of a libddwaf run. See github.com/DataDog/libddwaf/blob/8dbee187ff74a0aa25e1bcbdde51677f77930e1b/include/ddwaf.h#L277-L290
Instance Attribute Summary collapse
-
#actions ⇒ Object
readonly
Returns the value of attribute actions.
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#duration ⇒ Object
readonly
Returns the value of attribute duration.
-
#events ⇒ Object
readonly
Returns the value of attribute events.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(status:, events:, actions:, attributes:, duration:, timeout:, keep:) ⇒ Result
constructor
A new instance of Result.
- #input_truncated? ⇒ Boolean
- #keep? ⇒ Boolean
- #mark_input_truncated! ⇒ Object
- #timeout? ⇒ Boolean
- #to_h ⇒ Object
Constructor Details
#initialize(status:, events:, actions:, attributes:, duration:, timeout:, keep:) ⇒ Result
Returns a new instance of Result.
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/datadog/appsec/waf/result.rb', line 11 def initialize(status:, events:, actions:, attributes:, duration:, timeout:, keep:) @status = status @events = events @actions = actions @attributes = attributes @duration = duration @keep = !!keep @timeout = !!timeout @input_truncated = false end |
Instance Attribute Details
#actions ⇒ Object (readonly)
Returns the value of attribute actions.
9 10 11 |
# File 'lib/datadog/appsec/waf/result.rb', line 9 def actions @actions end |
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
9 10 11 |
# File 'lib/datadog/appsec/waf/result.rb', line 9 def attributes @attributes end |
#duration ⇒ Object (readonly)
Returns the value of attribute duration.
9 10 11 |
# File 'lib/datadog/appsec/waf/result.rb', line 9 def duration @duration end |
#events ⇒ Object (readonly)
Returns the value of attribute events.
9 10 11 |
# File 'lib/datadog/appsec/waf/result.rb', line 9 def events @events end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
9 10 11 |
# File 'lib/datadog/appsec/waf/result.rb', line 9 def status @status end |
Instance Method Details
#input_truncated? ⇒ Boolean
35 36 37 |
# File 'lib/datadog/appsec/waf/result.rb', line 35 def input_truncated? @input_truncated end |
#keep? ⇒ Boolean
31 32 33 |
# File 'lib/datadog/appsec/waf/result.rb', line 31 def keep? @keep end |
#mark_input_truncated! ⇒ Object
23 24 25 |
# File 'lib/datadog/appsec/waf/result.rb', line 23 def mark_input_truncated! @input_truncated = true end |
#timeout? ⇒ Boolean
27 28 29 |
# File 'lib/datadog/appsec/waf/result.rb', line 27 def timeout? @timeout end |
#to_h ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/datadog/appsec/waf/result.rb', line 39 def to_h { status: @status, events: @events, actions: @actions, attributes: @attributes, duration: @duration, keep: @keep, timeout: @timeout, input_truncated: @input_truncated } end |