Class: Fear::PartialFunction::Guard::And Private
- Inherits:
-
Fear::PartialFunction::Guard
- Object
- Fear::PartialFunction::Guard
- Fear::PartialFunction::Guard::And
- Defined in:
- lib/fear/partial_function/guard/and.rb
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.
Instance Method Summary collapse
- #===(arg) ⇒ Boolean private
- #and(other) ⇒ Fear::PartialFunction::Guard private
-
#initialize(c1, c2) ⇒ And
constructor
private
A new instance of And.
- #or(other) ⇒ Fear::PartialFunction::Guard private
Methods inherited from Fear::PartialFunction::Guard
Constructor Details
#initialize(c1, c2) ⇒ And
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.
Returns a new instance of And.
8 9 10 11 |
# File 'lib/fear/partial_function/guard/and.rb', line 8 def initialize(c1, c2) @c1 = c1 @c2 = c2 end |
Instance Method Details
#===(arg) ⇒ Boolean
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.
30 31 32 |
# File 'lib/fear/partial_function/guard/and.rb', line 30 def ===(arg) (c1 === arg) && (c2 === arg) end |
#and(other) ⇒ Fear::PartialFunction::Guard
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.
18 19 20 |
# File 'lib/fear/partial_function/guard/and.rb', line 18 def and(other) Guard::And.new(self, other) end |
#or(other) ⇒ Fear::PartialFunction::Guard
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.
24 25 26 |
# File 'lib/fear/partial_function/guard/and.rb', line 24 def or(other) Guard::Or.new(self, other) end |