Class: FailFast::ErrorDetails
- Inherits:
-
Struct
- Object
- Struct
- FailFast::ErrorDetails
- Defined in:
- lib/fail_fast/support/error_details.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
Returns the value of attribute key.
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#message ⇒ Object
Returns the value of attribute message.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
- #has_key_and_kind?(akey, akind) ⇒ Boolean
- #has_value_and_kind?(avalue, akind) ⇒ Boolean
-
#initialize(key, kind, value = nil, message = nil) ⇒ ErrorDetails
constructor
A new instance of ErrorDetails.
Constructor Details
#initialize(key, kind, value = nil, message = nil) ⇒ ErrorDetails
Returns a new instance of ErrorDetails.
5 6 7 |
# File 'lib/fail_fast/support/error_details.rb', line 5 def initialize(key, kind, value=nil, =nil) @key, @kind, @value, @message = key, kind, value, end |
Instance Attribute Details
#key ⇒ Object
Returns the value of attribute key
1 2 3 |
# File 'lib/fail_fast/support/error_details.rb', line 1 def key @key end |
#kind ⇒ Object
Returns the value of attribute kind
1 2 3 |
# File 'lib/fail_fast/support/error_details.rb', line 1 def kind @kind end |
#message ⇒ Object
Returns the value of attribute message
1 2 3 |
# File 'lib/fail_fast/support/error_details.rb', line 1 def @message end |
#value ⇒ Object
Returns the value of attribute value
1 2 3 |
# File 'lib/fail_fast/support/error_details.rb', line 1 def value @value end |
Instance Method Details
#has_key_and_kind?(akey, akind) ⇒ Boolean
9 10 11 |
# File 'lib/fail_fast/support/error_details.rb', line 9 def has_key_and_kind?(akey, akind) (key.to_s == akey.to_s) && kind.to_sym == akind.to_sym end |
#has_value_and_kind?(avalue, akind) ⇒ Boolean
13 14 15 |
# File 'lib/fail_fast/support/error_details.rb', line 13 def has_value_and_kind?(avalue, akind) (value.to_s == avalue.to_s) && kind.to_sym == akind.to_sym end |