Class: Hanami::V1::Validations::InlinePredicate Private
- Inherits:
-
Object
- Object
- Hanami::V1::Validations::InlinePredicate
- Defined in:
- lib/hanami/v1/validations/inline_predicate.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.
Inline predicate
Instance Attribute Summary collapse
- #message ⇒ Object readonly private
- #name ⇒ Object readonly private
Instance Method Summary collapse
- #==(other) ⇒ Object private
-
#initialize(name, message, &blk) ⇒ Hanami::Validations::InlinePredicate
constructor
private
Return a new instance.
- #to_proc ⇒ Object private
Constructor Details
#initialize(name, message, &blk) ⇒ Hanami::Validations::InlinePredicate
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.
Return a new instance.
29 30 31 32 33 |
# File 'lib/hanami/v1/validations/inline_predicate.rb', line 29 def initialize(name, , &blk) @name = name @message = @blk = blk end |
Instance Attribute Details
#message ⇒ Object (readonly)
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.
17 18 19 |
# File 'lib/hanami/v1/validations/inline_predicate.rb', line 17 def @message end |
#name ⇒ Object (readonly)
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.
13 14 15 |
# File 'lib/hanami/v1/validations/inline_predicate.rb', line 13 def name @name end |
Instance Method Details
#==(other) ⇒ Object
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.
43 44 45 46 |
# File 'lib/hanami/v1/validations/inline_predicate.rb', line 43 def ==(other) self.class == other.class && name == other.name end |
#to_proc ⇒ Object
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.
37 38 39 |
# File 'lib/hanami/v1/validations/inline_predicate.rb', line 37 def to_proc @blk end |