Permalink
Browse files

Remove call do #delegate so we can run outside of Rails.

  • Loading branch information...
1 parent f5389af commit bb1915fcb1a62e3b418962274afcdc0d54495789 @Bira Bira committed Mar 8, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 lib/rollout_ui/feature.rb
@@ -4,8 +4,6 @@ class Feature
attr_reader :name
- delegate :percentage_key, :group_key, :user_key, :to => :rollout
-
def initialize(name)
@wrapper = Wrapper.new
@name = name
@@ -46,5 +44,11 @@ def redis
def rollout
@wrapper.rollout
end
+
+ [:percentage_key, :group_key, :user_key].each do |method_name|
+ define_method(method_name) {|name| rollout.send(method_name, name)}
+ end
+
+
end
end

0 comments on commit bb1915f

Please sign in to comment.