Sha256: 560818b96eb7737c415d45ff4b7608e2d98cddf3050d14bb944bab16f9ae7abd
Contents?: true
Size: 531 Bytes
Versions: 3
Compression:
Stored size: 531 Bytes
Contents
require File.dirname(__FILE__) + "/../command_handler" module Glimmer class PropertyCommandHandler include CommandHandler def can_handle?(parent, command_symbol, *args, &block) parent.respond_to?(:set_attribute) and parent.respond_to?(:has_attribute?) 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
3 entries across 3 versions & 1 rubygems