Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to decorate methods with block arguments #14

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Ishotihadus
Copy link

This PR will add support to decorate methods with block arguments.

For example:

require 'adornable'

class Test
  extend Adornable

  decorate :log
  def foo(value)
    yield(value)
  end
end

test = Test.new
test.foo(42){|e| e.to_s}
# Calling method `Test#foo` with arguments `[42, #<Proc:0x0000000120e99870 (irb):13>]`
# => "42"

Related issue: #13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant