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

Adds Entity DSL #234

Merged
merged 2 commits into from
Aug 29, 2012
Merged

Adds Entity DSL #234

merged 2 commits into from
Aug 29, 2012

Conversation

mbleigh
Copy link
Contributor

@mbleigh mbleigh commented Aug 28, 2012

This is the simplest implementation I could think of. It works like this:

class User
  include Grape::Entity::DSL

  # simple attributes can be defined inline
  entity :name, :email do
    expose :optional, if: :condition
  end
end

What do you think?

@travisbot
Copy link

This pull request fails (merged 7166363 into 3641744).

@mbleigh
Copy link
Contributor Author

mbleigh commented Aug 28, 2012

Looks like there's some problem with non 1.9 rubies and this code. Any clues?

@travisbot
Copy link

This pull request passes (merged 1b9217d into 3641744).

@dblock
Copy link
Member

dblock commented Aug 29, 2012

Very nice, merging.

dblock added a commit that referenced this pull request Aug 29, 2012
@dblock dblock merged commit 08d2f48 into master Aug 29, 2012
@dblock
Copy link
Member

dblock commented Aug 29, 2012

Add a line to the CHANGELOG please, too.

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.

3 participants