diff --git a/.standard.yml b/.standard.yml index 8f2de2ad..39471890 100644 --- a/.standard.yml +++ b/.standard.yml @@ -1,6 +1,6 @@ fix: true parallel: true -ruby_version: 2.4 +ruby_version: 2.7 ignore: - 'vendor/**/*' diff --git a/graphiti.gemspec b/graphiti.gemspec index 40f9589a..1c7e67ef 100644 --- a/graphiti.gemspec +++ b/graphiti.gemspec @@ -16,7 +16,7 @@ Gem::Specification.new do |spec| spec.bindir = "exe" spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.require_paths = ["lib"] - spec.required_ruby_version = ">= 2.6" + spec.required_ruby_version = ">= 2.7" spec.add_dependency "jsonapi-serializable", "~> 0.3.0" spec.add_dependency "jsonapi-renderer", "~> 0.2", ">= 0.2.2" diff --git a/lib/graphiti/serializer.rb b/lib/graphiti/serializer.rb index 6465bd9e..706dbdca 100644 --- a/lib/graphiti/serializer.rb +++ b/lib/graphiti/serializer.rb @@ -71,9 +71,9 @@ def as_jsonapi(kwargs = {}) end # Allow access to resource methods - def method_missing(id, *args, &blk) + def method_missing(id, ...) if @resource.respond_to?(id, true) - @resource.send(id, *args, &blk) + @resource.send(id, ...) else super end