Class: Repeatable::Expression::Date

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

Instance Method Summary collapse

Methods inherited from Base

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

Instance Method Details

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



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

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

#hashObject



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

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

#to_hObject



4
5
6
# File 'lib/repeatable/expression/date.rb', line 4

def to_h
  Hash[hash_key, attributes]
end