Skip to content

Commit

Permalink
fix ruby 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Giallombardo Nathan committed Aug 14, 2024
1 parent 9f5f5ed commit e9a5224
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/couchbase-orm/attributes/dynamic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module AttributesDynamic
#
# @return [ true | false ] True if it does, false if not.
def respond_to?(name, include_private = false)
super || has_attribute?(name.to_s.reader)
super || attributes.key?(name.to_s.reader)
end

private
Expand Down Expand Up @@ -118,7 +118,7 @@ def method_missing(name, *args)
getter = attr.reader

return super if getter == 'id'
return super if has_attribute?(getter)
return super if attributes.key?(getter)

if attr.writer?
define_dynamic_writer(getter)
Expand Down

0 comments on commit e9a5224

Please sign in to comment.