Module: Utils::Decorate::ClassMethods
- Defined in:
- lib/lita/utils/decorate.rb
Overview
def initialize(route)
@route = route
end
Instance Method Summary collapse
Instance Method Details
#check_auth(*methods) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/lita/utils/decorate.rb', line 14 def check_auth(*methods) methods.each do |method| old = "_#{method}".to_sym alias_method old, method define_method method do |*args| send(old, *args) end #if self.class_eval("expired") # authenticate #end #unless self.respond_to?(arg) # self.class.send(:define_method,arg,Proc.new {}) #self.class_eval(self.methods[arg]) end end |