Class: SmartCore::Schema::Checker::Rules::Result::Failure Private

Inherits:
Base
  • Object
show all
Defined in:
lib/smart_core/schema/checker/rules/result/failure.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Since:

  • 0.1.0

Instance Attribute Summary collapse

Attributes inherited from Base

#key, #value

Instance Method Summary collapse

Methods inherited from Base

#success?

Constructor Details

#initialize(key:, value:, error:, message:) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

  • key (Hash)

    a customizable set of options

  • value (Hash)

    a customizable set of options

  • error (Hash)

    a customizable set of options

  • message (Hash)

    a customizable set of options

Options Hash (key:):

  • (String)

Options Hash (value:):

  • (Any)

Options Hash (error:):

  • (Symbol)

Options Hash (message:):

  • (String)

Since:

  • 0.1.0



27
28
29
30
31
# File 'lib/smart_core/schema/checker/rules/result/failure.rb', line 27

def initialize(key:, value:, error:, message:)
  super(key: key, value: value)
  @error = error
  @message = message
end

Instance Attribute Details

#errorSymbol (readonly)

Returns:

  • (Symbol)

Since:

  • 0.1.0



11
12
13
# File 'lib/smart_core/schema/checker/rules/result/failure.rb', line 11

def error
  @error
end

#messageString (readonly)

Returns:

  • (String)

Since:

  • 0.1.0



17
18
19
# File 'lib/smart_core/schema/checker/rules/result/failure.rb', line 17

def message
  @message
end

Instance Method Details

#failure?Boolean

Returns:

  • (Boolean)

Since:

  • 0.1.0



37
38
39
# File 'lib/smart_core/schema/checker/rules/result/failure.rb', line 37

def failure?
  true
end