Permalink
Browse files

I heard you don't like evals, so I took the eval

out of your eval.
  • Loading branch information...
1 parent 1cfba50 commit 260ee4a99cd08ae8c53fb0199b66f378e4e4acc4 Nathan Long committed Dec 10, 2012
Showing with 2 additions and 6 deletions.
  1. +2 −6 lib/authority/abilities.rb
@@ -23,19 +23,15 @@ def authorizer
# Send all calls like `editable_by?` to an authorizer instance
Authority.adjectives.each do |adjective|
- class_eval <<-RUBY, __FILE__, __LINE__ + 1
- def_delegators :authorizer, :"#{adjective}_by?"
- RUBY
+ def_delegators :authorizer, :"#{adjective}_by?"
end
module ClassMethods
extend Forwardable
# Send all calls like `editable_by?` to the authorizer class
Authority.adjectives.each do |adjective|
- class_eval <<-RUBY, __FILE__, __LINE__ + 1
- def_delegators :authorizer, :"#{adjective}_by?"
- RUBY
+ def_delegators :authorizer, :"#{adjective}_by?"
end
# @return [Class] of the designated authorizer

0 comments on commit 260ee4a

Please sign in to comment.