I'm working on a Ruby gem that should work in a Rails environment, as well as in a Vanilla Ruby (non-Rails) environment. However, I need to implement different logic at some point that depends on whether the gem is required in a Rails project or in some normal Ruby code. How do I detect the difference?
No responses yet.