Class: Hashira::CI::Accepted::Entry
- Inherits:
-
Data
- Object
- Data
- Hashira::CI::Accepted::Entry
- Defined in:
- lib/hashira/ci/accepted.rb
Instance Attribute Summary collapse
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#package ⇒ Object
readonly
Returns the value of attribute package.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#kind ⇒ Object (readonly)
Returns the value of attribute kind
10 11 12 |
# File 'lib/hashira/ci/accepted.rb', line 10 def kind @kind end |
#package ⇒ Object (readonly)
Returns the value of attribute package
10 11 12 |
# File 'lib/hashira/ci/accepted.rb', line 10 def package @package end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason
10 11 12 |
# File 'lib/hashira/ci/accepted.rb', line 10 def reason @reason end |
Class Method Details
.from(hash) ⇒ Object
11 |
# File 'lib/hashira/ci/accepted.rb', line 11 def self.from(hash) = new(kind: hash["kind"], package: hash["package"], reason: hash["reason"]) |
Instance Method Details
#label ⇒ Object
15 |
# File 'lib/hashira/ci/accepted.rb', line 15 def label = reason || "accepted (no reason recorded)" |
#matches?(finding) ⇒ Boolean
13 |
# File 'lib/hashira/ci/accepted.rb', line 13 def matches?(finding) = [kind, package] == [finding.kind, finding.package] |
#to_h ⇒ Object
17 |
# File 'lib/hashira/ci/accepted.rb', line 17 def to_h = { kind:, package:, reason: }.compact |