Skip to content

reduce logic checks - #16

Open
nestor-custodio wants to merge 2 commits into
ruby:masterfrom
nestor-custodio:nlc/simplify-checks
Open

reduce logic checks#16
nestor-custodio wants to merge 2 commits into
ruby:masterfrom
nestor-custodio:nlc/simplify-checks

Conversation

@nestor-custodio

Copy link
Copy Markdown

Was reading through this gem to understand how it works and realized the logic could be cleaned up a bit with the simple addition of a lazy accessor for the @observer_peers instance variable, making it easier to follow what the Observable module is actually doing.

This PR adds this lazy accessor and renames the following variables to make their use more clear:

  • @observer_peers => observers (via the lazy ||= {} accessor)
  • @observer_state => @notification_pending

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.

1 participant