Class: Repeatable::Expression::Base
- Inherits:
-
Object
- Object
- Repeatable::Expression::Base
- Extended by:
- T::Helpers, T::Sig
- Defined in:
- lib/repeatable/expression/base.rb
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
- #deconstruct_keys(_keys) ⇒ Object
- #difference(other) ⇒ Object (also: #-)
- #include?(date) ⇒ Boolean
- #intersection(other) ⇒ Object (also: #&)
- #to_h ⇒ Object
- #union(other) ⇒ Object (also: #+, #|)
Class Method Details
.===(other) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/repeatable/expression/base.rb', line 12 def self.===(other) case other when Class other.ancestors.include?(self) else super end end |
Instance Method Details
#deconstruct_keys(_keys) ⇒ Object
31 32 33 |
# File 'lib/repeatable/expression/base.rb', line 31 def deconstruct_keys(_keys) to_h end |
#difference(other) ⇒ Object Also known as: -
49 50 51 |
# File 'lib/repeatable/expression/base.rb', line 49 def difference(other) Difference.new(included: self, excluded: other) end |
#include?(date) ⇒ Boolean
22 23 |
# File 'lib/repeatable/expression/base.rb', line 22 def include?(date) end |
#intersection(other) ⇒ Object Also known as: &
43 44 45 |
# File 'lib/repeatable/expression/base.rb', line 43 def intersection(other) Intersection.new(self, other) end |
#to_h ⇒ Object
26 27 28 |
# File 'lib/repeatable/expression/base.rb', line 26 def to_h {hash_key => hash_value} end |