Skip to content

refactor(configuration): use node[attr] in node_missing_parameters? - #65

Merged
tharropoulos merged 1 commit into
typesense:masterfrom
OLIOEX:simplify-node-missing-parameters
Nov 11, 2026
Merged

tharropoulos merged 1 commit into
typesense:masterfrom
OLIOEX:simplify-node-missing-parameters

Conversation

@erimicel

Copy link
Copy Markdown
Contributor

Replaces node.send(:[], attr) with node[attr] in Configuration#node_missing_parameters?. node is a Hash, so the behaviour is the same with less indirection. Split out from #60.

%i[protocol host port].any? { |attr| node.send(:[], attr).nil? }
# →
%i[protocol host port].any? { |attr| node[attr].nil? }

Verification

  • bundle exec rspec spec/typesense/configuration_spec.rb: 5 examples, 0 failures. These include the missing protocol/host/port cases.
  • bundle exec rubocop lib/typesense/configuration.rb: no offenses.

PR Checklist

node is a Hash, so node.send(:[], attr) and node[attr] behave the same.
@erimicel
erimicel force-pushed the simplify-node-missing-parameters branch from 8650529 to f36636e Compare November 10, 2026 20:19
@tharropoulos
tharropoulos merged commit 7ed5078 into typesense:master Nov 11, 2026
5 checks passed
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.

2 participants