Skip to content

Commit

Permalink
#ruby_implicity_keyword_argument? -> #ruby_omit_hash_values? (Ref #…
Browse files Browse the repository at this point in the history
  • Loading branch information
jodosha committed Oct 26, 2023
1 parent 200b5f6 commit d25301c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/hanami/cli/generators/context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def bundled_assets?
# @api private
#
# @see https://rubyreferences.github.io/rubychanges/3.1.html#values-in-hash-literals-and-keyword-arguments-can-be-omitted
def ruby_implicity_keyword_argument?
def ruby_omit_hash_values?
RUBY_VERSION >= "3.1"
end

Expand Down
6 changes: 3 additions & 3 deletions spec/unit/hanami/cli/generators/context_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
let(:inflector) { Dry::Inflector.new }
let(:app) { double("app") }

describe "#ruby_implicity_keyword_argument?" do
describe "#ruby_omit_hash_values?" do
if RUBY_VERSION >= "3.1"
it "returns true" do
expect(subject.ruby_implicity_keyword_argument?).to be(true)
expect(subject.ruby_omit_hash_values?).to be(true)
end
else
it "returns false" do
expect(subject.ruby_implicity_keyword_argument?).to be(false)
expect(subject.ruby_omit_hash_values?).to be(false)
end
end
end
Expand Down

0 comments on commit d25301c

Please sign in to comment.