]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/quotes.rb
Module\#define_structure method: define a new Struct only if doesn't exist already...
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / quotes.rb
index 6851b65f2f2c0ff83b463482d5450a300ad2f728..b5017a58852fe121472a7011db787511495e613d 100644 (file)
@@ -1,6 +1,6 @@
 # GB: Ok, we *really* need to switch to db for this plugin too
 
-Quote = Struct.new("Quote", :num, :date, :source, :quote)
+define_structure :Quote, :num, :date, :source, :quote
 
 class QuotePlugin < Plugin
   def initialize