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

Provide mass assignment through initialize method. #38

Merged
merged 1 commit into from
Jul 2, 2013

Conversation

volontarian
Copy link
Contributor

As the title says ;-)

@ezkl
Copy link
Collaborator

ezkl commented Jul 1, 2013

Sorry for the delay, @applicat. Thanks for the spec'ed pull-request!

Do you mind sharing a use case for this change?

@volontarian
Copy link
Contributor Author

The use case is shown in the spec commit.

It's a alternative for parse method and a shortcut for calling multiple accessors on a document instance I needed in the past but cannot find a real world usage anymore except of test factories ;-)

So you could write

AtomEntry.new(title: 'Dummy 1', name: 'Dummy 2') 

instead of

entry = AtomEntry.new
entry.title = 'Dummy 1'
entry.name = 'Dummy 2'

ezkl added a commit that referenced this pull request Jul 2, 2013
Provide mass assignment through initialize method.
@ezkl ezkl merged commit 4027000 into pauldix:master Jul 2, 2013
@ezkl
Copy link
Collaborator

ezkl commented Jul 2, 2013

Thanks for the reply and the PR!

@volontarian
Copy link
Contributor Author

Thank you, too.

@volontarian volontarian deleted the mass-assignment-initialize-method branch July 3, 2013 09:05
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