Sha256: 216e566da3228b1d6f3f5a716430ea7142f7a23d80532fc0d57df4915b40381b
Contents?: true
Size: 520 Bytes
Versions: 1
Compression:
Stored size: 520 Bytes
Contents
require File.dirname(__FILE__) + "/../command_handler" require File.dirname(__FILE__) + "/models/g_widget" module Glimmer class WidgetMethodCommandHandler include CommandHandler def can_handle?(parent, command_symbol, *args, &block) parent.is_a?(GWidget) and args.size > 0 and block == nil and parent.has_attribute?(command_symbol, *args) end def do_handle(parent, command_symbol, *args, &block) parent.set_attribute(command_symbol, *args) nil end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
glimmer-0.4.0 | lib/glimmer/command_handlers/widget_method_command_handler.rb |