Method: Xot::Invoker#invoke
- Defined in:
- lib/xot/invoker.rb
#invoke(name, attributes = {}, options = {}) ⇒ Object
31 32 33 34 35 36 37 38 39 40 |
# File 'lib/xot/invoker.rb', line 31 def invoke(name, attributes = {}, = {}) only = [:only] only = [only] if only && !only.kind_of?(Array) handlers = only ? only : @handlers return unless handlers handlers.each do |handler| handler.send name, OpenStruct.new(attributes) if handler.respond_to? name end end |