Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumRubysend and public_sendSingle-choice MCQ

Given a class with a private method, what is the result of these two calls?

class Account def initialize = @balance = 100 private def secret_balance = @balance end a = Account.new a.send(:secret_balance) a.public_send(:secret_balance)