lib/active_object/object.rb in active_object-4.0.8 vs lib/active_object/object.rb in active_object-4.0.9
- old
+ new
@@ -14,13 +14,15 @@
def boolean?
TRUE_VALUES.include?(self) || FALSE_VALUES.include?(self)
end
+ # rubocop:disable Style/YodaCondition
def false?
- self == false
+ false == self
end
+ # rubocop:enable Style/YodaCondition
def falsey?
nil? || FALSE_VALUES.include?(self)
end
@@ -70,12 +72,14 @@
def time?
is_a?(Time)
end
+ # rubocop:disable Style/YodaCondition
def true?
- self == true
+ true == self
end
+ # rubocop:enable Style/YodaCondition
def truthy?
TRUE_VALUES.include?(self)
end