Sha256: 99cba602a66a9df62d5d2830c93a877fce4244f9c8059546201562fd9c04e40c
Contents?: true
Size: 445 Bytes
Versions: 9
Compression:
Stored size: 445 Bytes
Contents
class Shoes class Widget def self.inherited klass, &blk m = klass.inspect.downcase.split('::').last Shoes::App.class_eval do define_method m do |*args, &blk| klass.class_variable_set :@@app, self klass.new *args, &blk end end klass.class_eval do def method_missing m, *arg, &blk @@app.send m, *arg, &blk end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems