Embracing Flexibility: Unleashing the Power of respond_to? in Ruby