Skip to content

Commit ae2027e

Browse files
committed
Update README
1 parent 17c2421 commit ae2027e

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

+18
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ class Foo
2323
puts "b: #{b}"
2424
puts "c: #{c}"
2525
puts "d: #{d}"
26+
27+
buzz
28+
end
29+
30+
def buzs
31+
puts 'buzz'
2632
end
2733
end
2834
```
@@ -41,32 +47,44 @@ class Bar < ActiveMethod::Base
4147
puts "b: #{b}"
4248
puts "c: #{c}"
4349
puts "d: #{d}"
50+
51+
foo.buzz
4452
end
4553
end
4654

55+
class Foo
56+
include ActiveMethod
57+
58+
active_method :bar
59+
end
60+
4761
Bar.call(1)
4862
# => a: 1
4963
# => b: 2
5064
# => c: nil
5165
# => d: 4
66+
# => buzz
5267

5368
Bar.call(1, 3)
5469
# => a: 1
5570
# => b: 3
5671
# => c: nil
5772
# => d: 4
73+
# => buzz
5874

5975
Bar.call(1, 3, c: 6)
6076
# => a: 1
6177
# => b: 3
6278
# => c: 6
6379
# => d: 4
80+
# => buzz
6481

6582
Bar.call(1, 3, c: 4, d: 5)
6683
# => a: 1
6784
# => b: 3
6885
# => c: 4
6986
# => d: 5
87+
# => buzz
7088
```
7189

7290
## Development

0 commit comments

Comments
 (0)