From eb6bdd2caac366874e765e71088cc4a6ef42b4bf Mon Sep 17 00:00:00 2001 From: Watson Date: Tue, 30 Apr 2013 01:24:30 +0900 Subject: [PATCH] refactor --- lib/motion/project/builder.rb | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/motion/project/builder.rb b/lib/motion/project/builder.rb index e5ad94b1..f11391d8 100644 --- a/lib/motion/project/builder.rb +++ b/lib/motion/project/builder.rb @@ -614,15 +614,11 @@ PLIST end def on_const_ref(args) - type, const_name, position = args - @defined << const_name + args end def on_var_field(args) - type, name, position = args - if type == :@const - @defined << name - end + args end def on_var_ref(args) @@ -641,19 +637,21 @@ PLIST end def on_module(const, *args) - type, name = const + type, name, position = const if type == :@const @defined << name @referred.delete(name) end + [] end def on_class(const, *args) - type, name = const + type, name, position = const if type == :@const @defined << name @referred.delete(name) end + [] end end end