Method: Treat::Proxies::Array#method_missing

Defined in:
lib/treat/proxies/array.rb

#method_missing(sym, *args, &block) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/treat/proxies/array.rb', line 6

def method_missing(sym, *args, &block)
  if [:do, :apply].include?(sym) || 
    Treat::Workers.lookup(sym)
    map do |el|
      if el.is_a?(Treat::Entities::Entity)
        el.send(sym, *args)
      else
        el.to_entity.send(sym, *args)
      end
    end
  else
    super(sym, *args, &block)
  end
end