Skip to content

Commit 54c2874

Browse files
committed
Add @__method_owner in the README
1 parent 3d11811 commit 54c2874

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,21 @@ User.new.foo('aa', 3, c: 'cc', d: 5)
5858
class User
5959
include ActiveMethod
6060
attr_accessor :name
61+
attr_accessor :fromal_name
6162
active_method :hi
6263
end
6364

6465
class Hi < ActiveMethod::Base
6566
def call
66-
puts "Hi, I'm #{user.name}"
67+
puts "Hi, I'm a #{@__method_owner.fromal_name}. Please call me #{user.name}"
6768
end
6869
end
6970

7071
user = User.new
7172
user.name = 'ActiveMethod'
73+
user.fromal_name = 'method object'
7274
user.hi
73-
#=> Hi, I'm ActiveMethod
75+
#=> Hi, I'm a method objectc, please call me ActiveMethod
7476
```
7577

7678
## Development

0 commit comments

Comments
 (0)