Replaced ruby version check by `method_defined?`