lib/luruju/dynamic_method.rb in luruju-0.0.1 vs lib/luruju/dynamic_method.rb in luruju-0.1.0
- old
+ new
@@ -1,22 +1,16 @@
-
-
module Luruju
module DynamicMethod
class IsNotMyRole < StandardError
end
- def method_missing(method, *args)
- method_name = method.to_s
- methods.select{|m|/^dyna_.*/ =~ m.to_s}.sort.each { |dyna_method|
- begin
- return send(dyna_method, method, *args)
- rescue IsNotMyRole
- end
- }
- super
+ def method_missing method, *args
+ methods.select{|m|/^dyna_.*/ =~ m.to_s}.sort.each do |dyna_method|
+ return send(dyna_method, method, *args) rescue IsNotMyRole
+ end
+ super method, *args
end
end
end