summaryrefslogtreecommitdiffhomepage
path: root/dragon/args.rb
diff options
context:
space:
mode:
Diffstat (limited to 'dragon/args.rb')
-rw-r--r--dragon/args.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/dragon/args.rb b/dragon/args.rb
index 9cf6e33..5bb0ccf 100644
--- a/dragon/args.rb
+++ b/dragon/args.rb
@@ -200,5 +200,22 @@ module GTK
def autocomplete_methods
[:inputs, :outputs, :gtk, :state, :geometry, :audio, :grid, :layout, :fn]
end
+
+ def method_missing name, *args, &block
+ if (args.length <= 1) && (@state.as_hash.key? name)
+ raise <<-S
+* ERROR - :#{name} method missing on ~#{self.class.name}~.
+The method
+ :#{name}
+with args
+ #{args}
+doesn't exist on #{inspect}.
+** POSSIBLE SOLUTION - ~args.state.#{name}~ exists.
+Did you forget ~.state~ before ~.#{name}~?
+S
+ end
+
+ super
+ end
end
end