muby 0.7.12 → 0.7.13
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/muby.rb +1 -0
- data/lib/muby/configuration.rb +1 -1
- data/lib/muby/helper_methods.rb +1 -1
- data/lib/muby/trigger.rb +37 -0
- metadata +12 -12
data/lib/muby.rb
CHANGED
data/lib/muby/configuration.rb
CHANGED
data/lib/muby/helper_methods.rb
CHANGED
data/lib/muby/trigger.rb
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
|
2
|
+
module Muby
|
3
|
+
|
4
|
+
class Trigger
|
5
|
+
|
6
|
+
class Shot
|
7
|
+
attr_accessor :inwin, :outwin, :match, :trigger
|
8
|
+
def initialize(trigger, inwin, outwin, match)
|
9
|
+
@inwin = inwin
|
10
|
+
@outinw = outwin
|
11
|
+
@match = match
|
12
|
+
@trigger = trigger
|
13
|
+
end
|
14
|
+
def remove!
|
15
|
+
@trigger.remove!
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
attr_accessor :regexp, :block, :type
|
20
|
+
def initialize(type, regexp, &block)
|
21
|
+
@regexp = regexp
|
22
|
+
@block = block
|
23
|
+
@type = type
|
24
|
+
conf.send("#{@type}_triggers".to_sym)[@regexp] = self
|
25
|
+
end
|
26
|
+
def arity
|
27
|
+
3
|
28
|
+
end
|
29
|
+
def call(inwin, outwin, match)
|
30
|
+
block.call(Shot.new(self, inwin, outwin, match))
|
31
|
+
end
|
32
|
+
def remove!
|
33
|
+
conf.send("#{@type}_triggers".to_sym).delete(@regexp)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: muby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Kihlgren, Sy Ali
|
@@ -9,12 +9,11 @@ autorequire: muby
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-09-
|
12
|
+
date: 2008-09-30 00:00:00 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: ncurses
|
17
|
-
type: :runtime
|
18
17
|
version_requirement:
|
19
18
|
version_requirements: !ruby/object:Gem::Requirement
|
20
19
|
requirements:
|
@@ -31,21 +30,21 @@ extensions: []
|
|
31
30
|
extra_rdoc_files: []
|
32
31
|
|
33
32
|
files:
|
34
|
-
- lib/muby/completer.rb
|
35
|
-
- lib/muby/configuration.rb
|
36
33
|
- lib/muby/connection.rb
|
37
|
-
- lib/muby/displayer.rb
|
38
|
-
- lib/muby/help.rb
|
39
|
-
- lib/muby/inputwindow.rb
|
40
34
|
- lib/muby/logger.rb
|
41
|
-
- lib/muby/outputwindow.rb
|
42
35
|
- lib/muby/style.rb
|
43
36
|
- lib/muby/user_methods.rb
|
44
|
-
- lib/muby/application.rb
|
45
37
|
- lib/muby/helper_methods.rb
|
38
|
+
- lib/muby/application.rb
|
46
39
|
- lib/muby/user_window.rb
|
40
|
+
- lib/muby/configuration.rb
|
41
|
+
- lib/muby/inputwindow.rb
|
42
|
+
- lib/muby/help.rb
|
43
|
+
- lib/muby/outputwindow.rb
|
44
|
+
- lib/muby/completer.rb
|
45
|
+
- lib/muby/displayer.rb
|
46
|
+
- lib/muby/trigger.rb
|
47
47
|
- lib/muby.rb
|
48
|
-
- contrib/sy/cce.rb
|
49
48
|
- contrib/aardmud.org_4000/aliases/aard-aliases.rb
|
50
49
|
- contrib/aardmud.org_4000/gags/aard-gags.rb
|
51
50
|
- contrib/aardmud.org_4000/speedwalks/aard-sw-areas-vidblain.rb
|
@@ -66,6 +65,7 @@ files:
|
|
66
65
|
- contrib/aardmud.org_4000/misc/aard_consider_substitutions.rb
|
67
66
|
- contrib/aardmud.org_4000/aard-helpers.rb
|
68
67
|
- contrib/aardmud.org_4000/aard-config.rb
|
68
|
+
- contrib/sy/cce.rb
|
69
69
|
- contrib/aardmud.org_4000/README.txt
|
70
70
|
- LICENSE
|
71
71
|
has_rdoc: true
|
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
91
|
requirements: []
|
92
92
|
|
93
93
|
rubyforge_project:
|
94
|
-
rubygems_version: 1.
|
94
|
+
rubygems_version: 1.1.1
|
95
95
|
signing_key:
|
96
96
|
specification_version: 2
|
97
97
|
summary: A simple but powerful mud client.
|