File: send_msg.rb

package info (click to toggle)
yapra 0.1.2-7.2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 616 kB
  • sloc: ruby: 3,572; javascript: 248; makefile: 10
file content (18 lines) | stat: -rw-r--r-- 316 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
## Send Message Plugin -- Soutaro Matsumoto
##
## it invoke ruby method
##
## -module: send_msg
##  config:
##    method: to_s
##    params: 16
##

def send_msg(config, data)
  method = config['method'] || nil
  params = config['params'] || []
  
  data.collect {|x|
    method ? x.send(method, *params) : x
  }
end