Permalink
Browse files

"DEPRECATION WARNING: ActiveSupport::Memoizable is deprecated and wil…

…l be removed in future releases,simply use Ruby memoization pattern instead."
  • Loading branch information...
1 parent eb24732 commit b08c853bab1d973f5699805c339316ab6e4e78cb @amatsuda amatsuda committed Jul 16, 2012
Showing with 2 additions and 6 deletions.
  1. +2 −6 lib/chanko/unit.rb
View
@@ -69,7 +69,6 @@ def expand(klass_name, &block)
end
module ClassMethods
- extend ActiveSupport::Memoizable
attr_reader :shared_methods
def active_if(*symbols, &block)
@@ -99,11 +98,9 @@ def any(*symbols)
private :any
def unit_name
- self.name.split("::").first.underscore
+ @_unit_name ||= self.name.split("::").first.underscore
end
alias_method :ext_name, :unit_name
- memoize :unit_name
- memoize :ext_name
def expand_prefix
"__#{unit_name}__"
@@ -157,9 +154,8 @@ def function(label, options = {}, &block)
private :function
def underscore
- name.to_s.underscore
+ @_underscore ||= name.to_s.underscore
end
- memoize :underscore
def css_name
underscore

0 comments on commit b08c853

Please sign in to comment.