Skip to content

Add support to decorate methods with block arguments - #14

Open
Ishotihadus wants to merge 2 commits into
kjleitz:mainfrom
Ishotihadus:main
Open

Add support to decorate methods with block arguments#14
Ishotihadus wants to merge 2 commits into
kjleitz:mainfrom
Ishotihadus:main

Conversation

@Ishotihadus

Copy link
Copy Markdown

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