Looking for an elegant way to include a method argument if a statement is true. In this case it is a rest-client call, the argument is verify_ssl: FALSE. Below is the code with my last attempt I want to insert verify_ssl if @ignore_cert is TRUE. This is part of a larger class I have created. Thanks in advance!
def get_tenant_uid
JSON.parse(RestClient::Request.execute(method: :get,url: "#{base_url}/tenant",
headers: {:'X-SDS-AUTH-TOKEN' => @auth_token,
accept: :json
},
verify_ssl: FALSE if @ignore_cert
))
end