From 4ae7deecb4f7da3fdd2e42c2e6b5819d8824fd84 Mon Sep 17 00:00:00 2001 From: Joe Hellerstein Date: Mon, 6 Sep 2010 20:18:19 +0000 Subject: [PATCH] provide empty defaults for the state and declaration methods --- lib/bud.rb | 10 +++++++++- test/tc_inheritance.rb | 3 --- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/bud.rb b/lib/bud.rb index 8a950d50..7661f4da 100644 --- a/lib/bud.rb +++ b/lib/bud.rb @@ -48,12 +48,20 @@ def initialize(ip, port) #safe_rewrite end end + + ########### give empty defaults for these + def state + end + def declaration + end - # helper to define instance methods def singleton_class class << self; self; end end + ########### metaprogramming support for ruby and for rule rewriting + # helper to define instance methods + def safe_rewrite begin defn = meta_rewrite diff --git a/test/tc_inheritance.rb b/test/tc_inheritance.rb index dfec5ece..f02ebde0 100644 --- a/test/tc_inheritance.rb +++ b/test/tc_inheritance.rb @@ -5,9 +5,6 @@ def state table :tbl, ['k'], ['v'] end - def declaration - end - declare def bundle tbl << [2, 'a']