Sha256: 466d8854678094dbfc67a0947749c29bdb4cafb76f9e09f3df5951c643f593c6
Contents?: true
Size: 590 Bytes
Versions: 1
Compression:
Stored size: 590 Bytes
Contents
class StoreHelp < Linkbot::Plugin def self.on_store(args) mymsg = nil if args.length > 0 Linkbot::Plugin.plugins.each {|k,v| if v[:handlers][:"linkbot-store"] && v[:handlers][:"linkbot-store"][:help] && v[:handlers][:"linkbot-store"][:regex].match(args[0]) mymsg = v[:ptr].send(v[:handlers][:"linkbot-store"][:help]) end } end mymsg end Linkbot::Plugin.register('store_help', self, { :"linkbot-store" => {:regex => /^help$/, :handler => :on_store}, } ) end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
protolink-0.2.8 | example/linkbot/plugins/store_help.rb |