I want to run my own function that I've put into my ~/.bashrc
in Rails similar to how environment variables are called e.g. <%= ENV["EXAMPLE_VARIABLE"] %>
~ I will use it in a similar context.
I've read some popular questions on the subject (Calling Bash commands from Ruby; Execute Shell command from Ruby script) but I can't seem to put them to use.
I want to call a function that is loaded in my ~/.bashrc
and return the value it returns. I've tried testing with irb
but I keep getting no method found errors and don't really know what I'm doing.
Example function to test with:
#! /bin/bash
function get_custom_domain {
echo localhost
}