Skip to content

Fix warnings about redefined methods on AttributeTranslator - #2126

Merged
dblock merged 1 commit into
ruby-grape:masterfrom
samsonjs:fix-attribute-translator-warnings
Oct 26, 2020
Merged

dblock merged 1 commit into
ruby-grape:masterfrom
samsonjs:fix-attribute-translator-warnings

Conversation

@samsonjs

Copy link
Copy Markdown
Contributor

This fixes warnings about redefined attribute readers for AttributeTranslator#requirements and #request_method. The attr_reader call is redundant because those accessors are defined dynamically below that.

/Users/samsonjs/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/grape-1.5.0/lib/grape/router/attribute_translator.rb:31: warning: method redefined; discarding old requirements
/Users/samsonjs/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/grape-1.5.0/lib/grape/router/attribute_translator.rb:31: warning: method redefined; discarding old request_method

This fixes warnings about redefined attribute readers for #requirements
and #request_method.
@grape-bot

Copy link
Copy Markdown
1 Warning
⚠️ There’re library changes, but not tests. That’s OK as long as you’re refactoring existing code.

Generated by 🚫 danger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants