Class: VivlioStarter::CLI::Guards::Violation
- Inherits:
-
Data
- Object
- Data
- VivlioStarter::CLI::Guards::Violation
- Defined in:
- lib/vivlio_starter/cli/guards/base_check.rb
Overview
単一の前提条件違反。 detail は Common.log_error / log_warn の detail: に渡され、 2行目以降としてインデント表示される(logging_spec.md 準拠)。
Instance Attribute Summary collapse
-
#detail ⇒ Object
readonly
Returns the value of attribute detail.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#severity ⇒ Object
readonly
:error(停止)または :warn(警告のみ).
Instance Method Summary collapse
Instance Attribute Details
#detail ⇒ Object (readonly)
Returns the value of attribute detail
10 11 12 |
# File 'lib/vivlio_starter/cli/guards/base_check.rb', line 10 def detail @detail end |
#message ⇒ Object (readonly)
Returns the value of attribute message
10 11 12 |
# File 'lib/vivlio_starter/cli/guards/base_check.rb', line 10 def @message end |
#severity ⇒ Object (readonly)
:error(停止)または :warn(警告のみ)
10 11 12 13 |
# File 'lib/vivlio_starter/cli/guards/base_check.rb', line 10 Violation = Data.define(:severity, :message, :detail) do def error? = severity == :error def warn? = severity == :warn end |
Instance Method Details
#error? ⇒ Boolean
11 |
# File 'lib/vivlio_starter/cli/guards/base_check.rb', line 11 def error? = severity == :error |
#warn? ⇒ Boolean
12 |
# File 'lib/vivlio_starter/cli/guards/base_check.rb', line 12 def warn? = severity == :warn |