Class: Repeatable::Expression::Date Abstract

Inherits:
Base
  • Object
show all
Defined in:
lib/repeatable/expression/date.rb

Overview

This class is abstract.

It cannot be directly instantiated. Subclasses must implement the ‘abstract` methods below.

Instance Method Summary collapse

Methods inherited from Base

===, #deconstruct_keys, #difference, #include?, #intersection, #to_h, #union

Instance Method Details

#==(other) ⇒ Boolean Also known as: eql?

Parameters:

  • other (Object)

Returns:

  • (Boolean)


9
10
11
# File 'lib/repeatable/expression/date.rb', line 9

def ==(other)
  other.is_a?(self.class) && attributes == other.attributes
end

#hashInteger

Returns:

  • (Integer)


15
16
17
# File 'lib/repeatable/expression/date.rb', line 15

def hash
  [attributes.values, self.class.name].hash
end