Class: SlackValidBlockKit::Validator::Error
- Inherits:
-
Object
- Object
- SlackValidBlockKit::Validator::Error
- Defined in:
- lib/slack_valid_block_kit/validator/error.rb
Instance Attribute Summary collapse
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#option ⇒ Object
readonly
Returns the value of attribute option.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(kind, option = nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(kind, option = nil) ⇒ Error
Returns a new instance of Error.
4 5 6 7 |
# File 'lib/slack_valid_block_kit/validator/error.rb', line 4 def initialize(kind, option = nil) @kind = kind @option = option end |
Instance Attribute Details
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
3 4 5 |
# File 'lib/slack_valid_block_kit/validator/error.rb', line 3 def kind @kind end |
#option ⇒ Object (readonly)
Returns the value of attribute option.
3 4 5 |
# File 'lib/slack_valid_block_kit/validator/error.rb', line 3 def option @option end |
Class Method Details
.messages(errors_by_path) ⇒ Object
9 10 11 12 13 |
# File 'lib/slack_valid_block_kit/validator/error.rb', line 9 def self.(errors_by_path) errors_by_path.map { |path, errors| errors.map { |e| "#{path} : #{e.kind}" } }.flatten end |