Class: Datadog::Core::Remote::Configuration::Target
- Inherits:
-
Object
- Object
- Datadog::Core::Remote::Configuration::Target
- Defined in:
- lib/datadog/core/remote/configuration/target.rb
Overview
Target stores digest information
Instance Attribute Summary collapse
-
#digests ⇒ Object
readonly
Returns the value of attribute digests.
-
#length ⇒ Object
readonly
Returns the value of attribute length.
Class Method Summary collapse
Instance Method Summary collapse
- #check(content) ⇒ Object
-
#initialize(digests:, length:) ⇒ Target
constructor
A new instance of Target.
Constructor Details
#initialize(digests:, length:) ⇒ Target
Returns a new instance of Target.
58 59 60 61 |
# File 'lib/datadog/core/remote/configuration/target.rb', line 58 def initialize(digests:, length:) @digests = digests @length = length end |
Instance Attribute Details
#digests ⇒ Object (readonly)
Returns the value of attribute digests.
56 57 58 |
# File 'lib/datadog/core/remote/configuration/target.rb', line 56 def digests @digests end |
#length ⇒ Object (readonly)
Returns the value of attribute length.
56 57 58 |
# File 'lib/datadog/core/remote/configuration/target.rb', line 56 def length @length end |
Class Method Details
.parse(hash) ⇒ Object
48 49 50 51 52 53 |
# File 'lib/datadog/core/remote/configuration/target.rb', line 48 def parse(hash) length = Integer(hash['length']) digests = Configuration::DigestList.parse(hash['hashes']) new(digests: digests, length: length) end |
Instance Method Details
#check(content) ⇒ Object
65 66 67 |
# File 'lib/datadog/core/remote/configuration/target.rb', line 65 def check(content) digests.check(content) end |