class Repeatable::Expression::Date
Public Instance Methods
==(other)
click to toggle source
# File lib/repeatable/expression/date.rb, line 9 def ==(other) other.is_a?(self.class) && attributes == other.attributes end
Also aliased as: eql?
hash()
click to toggle source
# File lib/repeatable/expression/date.rb, line 15 def hash [attributes.values, self.class.name].hash end
Protected Instance Methods
attributes()
click to toggle source
# File lib/repeatable/expression/date.rb, line 22 def attributes instance_variables.each_with_object({}) do |name, hash| key = name.to_s.gsub(/^@/, "") next if key.start_with?("_") hash[key.to_sym] = normalize_attribute_value(instance_variable_get(name)) end end
Also aliased as: hash_value
normalize_attribute_value(value)
click to toggle source
# File lib/repeatable/expression/date.rb, line 32 def normalize_attribute_value(value) case value when ::Date value.to_s else value end end