File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,12 @@ class Foo
23
23
puts " b: #{ b } "
24
24
puts " c: #{ c } "
25
25
puts " d: #{ d } "
26
+
27
+ buzz
28
+ end
29
+
30
+ def buzs
31
+ puts ' buzz'
26
32
end
27
33
end
28
34
```
@@ -41,32 +47,44 @@ class Bar < ActiveMethod::Base
41
47
puts " b: #{ b } "
42
48
puts " c: #{ c } "
43
49
puts " d: #{ d } "
50
+
51
+ foo.buzz
44
52
end
45
53
end
46
54
55
+ class Foo
56
+ include ActiveMethod
57
+
58
+ active_method :bar
59
+ end
60
+
47
61
Bar .call(1 )
48
62
# => a: 1
49
63
# => b: 2
50
64
# => c: nil
51
65
# => d: 4
66
+ # => buzz
52
67
53
68
Bar .call(1 , 3 )
54
69
# => a: 1
55
70
# => b: 3
56
71
# => c: nil
57
72
# => d: 4
73
+ # => buzz
58
74
59
75
Bar .call(1 , 3 , c: 6 )
60
76
# => a: 1
61
77
# => b: 3
62
78
# => c: 6
63
79
# => d: 4
80
+ # => buzz
64
81
65
82
Bar .call(1 , 3 , c: 4 , d: 5 )
66
83
# => a: 1
67
84
# => b: 3
68
85
# => c: 4
69
86
# => d: 5
87
+ # => buzz
70
88
```
71
89
72
90
## Development
You can’t perform that action at this time.
0 commit comments