Class: Karafka::Web::Ui::Models::Status::Step
- Inherits:
-
Struct
- Object
- Struct
- Karafka::Web::Ui::Models::Status::Step
- Defined in:
- lib/karafka/web/ui/models/status.rb
Overview
Status of a single step of setup
Instance Attribute Summary collapse
-
#details ⇒ Object
Returns the value of attribute details.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
-
#partial_namespace ⇒ String
Local namespace for partial of a given type.
-
#success? ⇒ Boolean
Is the given step successfully configured and working.
-
#to_s ⇒ String
Stringified status.
Instance Attribute Details
#details ⇒ Object
Returns the value of attribute details
16 17 18 |
# File 'lib/karafka/web/ui/models/status.rb', line 16 def details @details end |
#status ⇒ Object
Returns the value of attribute status
16 17 18 |
# File 'lib/karafka/web/ui/models/status.rb', line 16 def status @status end |
Instance Method Details
#partial_namespace ⇒ String
Returns local namespace for partial of a given type.
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/karafka/web/ui/models/status.rb', line 23 def partial_namespace case status when :success then 'successes' when :warning then 'warnings' when :failure then 'failures' when :halted then 'failures' else raise ::Karafka::Errors::UnsupportedCaseError, status end end |
#success? ⇒ Boolean
Returns is the given step successfully configured and working.
18 19 20 |
# File 'lib/karafka/web/ui/models/status.rb', line 18 def success? status == :success || status == :warning end |
#to_s ⇒ String
Returns stringified status.
35 36 37 |
# File 'lib/karafka/web/ui/models/status.rb', line 35 def to_s status.to_s end |