The Battlemaster isn't a caster. You must be thinking of the Eldritch Knight.It would have to be a pretty big hack because I'm not picturing a spellcaster. (Off-topic, but if I had my druthers, the base Ranger class would be spell-free, and put the spellcasting in a sub-class.)