Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefer setters over ivars #1116

Closed
wants to merge 1 commit into from
Closed

Prefer setters over ivars #1116

wants to merge 1 commit into from

Conversation

bf4
Copy link
Member

@bf4 bf4 commented Sep 4, 2015

No description provided.

@meta = options[:meta]
@meta_key = options[:meta_key]
@scope = options[:scope]
def initialize(object, opts = {})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason for the optionsopts change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good eye. Because there is an options method set by @options method and options arguments passed to method that are not the same thing, so I thought to distinguish. Methods blow up more more nicely than ivars, too :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

though in the scope of this initializer, they may still be called options, now that I think about it

@bf4
Copy link
Member Author

bf4 commented Sep 17, 2015

Closed in favor of #1166

@bf4 bf4 closed this Sep 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants