Skip to content
This repository has been archived by the owner on May 4, 2024. It is now read-only.

Add ignore_private option #50

Closed
st0012 opened this issue Jun 21, 2020 · 0 comments · Fixed by #57
Closed

Add ignore_private option #50

st0012 opened this issue Jun 21, 2020 · 0 comments · Fixed by #57
Assignees
Milestone

Comments

@st0012
Copy link
Owner

st0012 commented Jun 21, 2020

Assume we have a class like:

class Operation
  def extras
    dig_attribute("extras")
  end

  private

  def data
    @data
  end

  def dig_attribute(attr)
    data.dig("attributes", attr) 
  end
end

Every time we call extras, it'll call dig_attribute and data as well. So the output of print_calls(operation) would look like this

截圖 2020-06-21 下午4 44 27

As you can see, the entries of private helpers like data and dig_attribute provide duplicated or redundant information.

So we should have an option to filter out calls of private helpers.

print_calls(operation, ignore_private: true)
@st0012 st0012 added the Feature label Jun 21, 2020
@st0012 st0012 added this to the v0.5.4 milestone Jun 21, 2020
@st0012 st0012 self-assigned this Jun 21, 2020
@st0012 st0012 closed this as completed in #57 Jul 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant