Sha256: bd22423116674b0a95ba5c3e433c9f84673317932208ccbea48d009170426263

Contents?: true

Size: 488 Bytes

Versions: 20

Compression:

Stored size: 488 Bytes

Contents

require File.dirname(__FILE__) + "/../command_handler"
require File.dirname(__FILE__) + "/models/r_widget"

class WidgetMethodCommandHandler
  include CommandHandler
  
  def can_handle?(parent, command_symbol, *args, &block)
    parent.is_a?(RWidget) 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

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
glimmer-0.3.5 lib/command_handlers/widget_method_command_handler.rb
glimmer-0.3.4 lib/command_handlers/widget_method_command_handler.rb
glimmer-0.3.3 lib/command_handlers/widget_method_command_handler.rb
glimmer-0.3.2 lib/command_handlers/widget_method_command_handler.rb
glimmer-0.3.1 lib/command_handlers/widget_method_command_handler.rb
glimmer-0.2.5 lib/command_handlers/widget_method_command_handler.rb
glimmer-0.2.4 lib/command_handlers/widget_method_command_handler.rb
glimmer-0.2.3 lib/command_handlers/widget_method_command_handler.rb
glimmer-0.2.2 lib/command_handlers/widget_method_command_handler.rb
glimmer-0.2.1 lib/command_handlers/widget_method_command_handler.rb
glimmer-0.2.0 lib/command_handlers/widget_method_command_handler.rb
glimmer-0.1.11.SWT4.14 lib/command_handlers/widget_method_command_handler.rb
glimmer-0.1.11.470 lib/command_handlers/widget_method_command_handler.rb
glimmer-0.1.10.470 lib/command_handlers/widget_method_command_handler.rb
glimmer-0.1.9.470 lib/command_handlers/widget_method_command_handler.rb
glimmer-0.1.8.470 lib/command_handlers/widget_method_command_handler.rb
glimmer-0.1.5.470 lib/command_handlers/widget_method_command_handler.rb
glimmer-0.1.4.470 lib/command_handlers/widget_method_command_handler.rb
glimmer-0.1.4.swt.pre.4.7.0 lib/command_handlers/widget_method_command_handler.rb
glimmer-0.1.3 lib/command_handlers/widget_method_command_handler.rb