weird behavior for methods ending with question marks
MathieuDerelle opened this issue · comments
Mathieu Derelle commented
for boolean values it make sense to define those methods :
x = Mailjet::Contact.first
x.persisted?
# => true
but it works for every type of attributes and seems weird
x.created_at?
# => Wed, 18 Jul 2018 13:29:29 +0000
x.name?
# => "Mat"
even more for undefined attributes
x.dsfdqfds
# => NoMethodError: undefined method `dsfdqfds' for #<Mailjet::Contact:0x007fdc7da95ec8>
x.dsfdqfds?
# => nil
# should raise "undefined method" too ?
compared to
x.name
# => "Mat"
x.name?
# => "Mat"
Yevhen Nakonechnyi commented
Fixed in v1.6.0