Skip to content

Commit 7e9aa52

Browse files
committed
Update exampels in README
1 parent 5dcc3f1 commit 7e9aa52

File tree

1 file changed

+4
-17
lines changed

1 file changed

+4
-17
lines changed

README.md

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -44,38 +44,25 @@ class Bar < ActiveMethod::Base
4444
end
4545
end
4646

47-
class Foo
48-
def bar(*args)
49-
Bar.call(*args)
50-
end
51-
52-
# Or
53-
54-
# def bar(a, b = 2, c:, d: 4)
55-
# Bar.call(a, b, c: c, d: d)
56-
# end
57-
end
58-
59-
60-
Foo.new.bar(1)
47+
Bar.call(1)
6148
# => a: 1
6249
# => b: 2
6350
# => c: nil
6451
# => d: 4
6552

66-
Foo.new.bar(1, 3)
53+
Bar.call(1, 3)
6754
# => a: 1
6855
# => b: 3
6956
# => c: nil
7057
# => d: 4
7158

72-
Foo.new.bar(1, 3, c: 6)
59+
Bar.call(1, 3, c: 6)
7360
# => a: 1
7461
# => b: 3
7562
# => c: 6
7663
# => d: 4
7764

78-
Foo.new.bar(1, 3, c: 4, d: 5)
65+
Bar.call(1, 3, c: 4, d: 5)
7966
# => a: 1
8067
# => b: 3
8168
# => c: 4

0 commit comments

Comments
 (0)