https://www.dailydishnews.org.uk/post/how-to-use-rails-magic-methods-in-plain-ruby-scripts-bsok6c