Class: Necropsy::Blocker
- Inherits:
-
Data
- Object
- Data
- Necropsy::Blocker
- Defined in:
- lib/necropsy/models.rb
Instance Attribute Summary collapse
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
-
#scope_kind ⇒ Object
readonly
Returns the value of attribute scope_kind.
-
#scope_value ⇒ Object
readonly
Returns the value of attribute scope_value.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#suggested_action ⇒ Object
readonly
Returns the value of attribute suggested_action.
Instance Method Summary collapse
- #caller_domain ⇒ Object
-
#initialize(kind:, scope_kind:, scope_value:, source:, reason:, suggested_action: :review, metadata: {}) ⇒ Blocker
constructor
A new instance of Blocker.
- #message ⇒ Object
- #to_h ⇒ Object
Constructor Details
#initialize(kind:, scope_kind:, scope_value:, source:, reason:, suggested_action: :review, metadata: {}) ⇒ Blocker
Returns a new instance of Blocker.
901 902 903 |
# File 'lib/necropsy/models.rb', line 901 def initialize(kind:, scope_kind:, scope_value:, source:, reason:, suggested_action: :review, metadata: {}) super end |
Instance Attribute Details
#kind ⇒ Object (readonly)
Returns the value of attribute kind
900 901 902 |
# File 'lib/necropsy/models.rb', line 900 def kind @kind end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata
900 901 902 |
# File 'lib/necropsy/models.rb', line 900 def @metadata end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason
900 901 902 |
# File 'lib/necropsy/models.rb', line 900 def reason @reason end |
#scope_kind ⇒ Object (readonly)
Returns the value of attribute scope_kind
900 901 902 |
# File 'lib/necropsy/models.rb', line 900 def scope_kind @scope_kind end |
#scope_value ⇒ Object (readonly)
Returns the value of attribute scope_value
900 901 902 |
# File 'lib/necropsy/models.rb', line 900 def scope_value @scope_value end |
#source ⇒ Object (readonly)
Returns the value of attribute source
900 901 902 |
# File 'lib/necropsy/models.rb', line 900 def source @source end |
#suggested_action ⇒ Object (readonly)
Returns the value of attribute suggested_action
900 901 902 |
# File 'lib/necropsy/models.rb', line 900 def suggested_action @suggested_action end |
Instance Method Details
#caller_domain ⇒ Object
909 910 911 |
# File 'lib/necropsy/models.rb', line 909 def caller_domain (['caller_domain'] || [:caller_domain] || :runtime).to_sym end |
#message ⇒ Object
905 906 907 |
# File 'lib/necropsy/models.rb', line 905 def ['message'] || [:message] || (scope_value if %i[message symbol].include?(scope_kind.to_sym)) end |
#to_h ⇒ Object
913 914 915 916 917 918 919 920 921 922 923 |
# File 'lib/necropsy/models.rb', line 913 def to_h { 'kind' => kind.to_s, 'scope_kind' => scope_kind.to_s, 'scope_value' => scope_value, 'source' => source.respond_to?(:to_h) ? source.to_h : source.to_s, 'reason' => reason, 'suggested_action' => suggested_action.to_s, 'metadata' => } end |