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

Already on GitHub? Sign in to your account

add the ability to define custom attributes within the #badge DSL; #3

Merged
merged 3 commits into from Oct 23, 2013

Conversation

Projects
None yet
1 participant
Owner

scottburton11 commented May 9, 2012

any new methods added to a badge block will dynamically added as DSL-style attribute getter/setter methods, and will be passed as attribute hashes when awarding badges.

Addresses issue #2

@scottburton11 scottburton11 add the ability to define custom attributes within the #badge DSL; an…
…y new methods added to a badge block will dynamically added as DSL-style attribute getter/setter methods, and will be passed as attribute hashes when awarding badges
e186bda
Owner

scottburton11 commented on e186bda May 9, 2012

Usage goes something like this:

badge "Fancy Pants" do
  ...
  points 42
end

When the badge is awarded, #add_badge will be called with :points => 42

@scottburton11 scottburton11 added a commit that referenced this pull request Oct 23, 2013

@scottburton11 scottburton11 Merge pull request #3 from scottburton11/custom_attrs
add the ability to define custom attributes within the #badge DSL;
d0cc155

@scottburton11 scottburton11 merged commit d0cc155 into master Oct 23, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment