@policy = File.read(RAILS_ROOT + '/config/my_policy.txt')
Also cache the content (if you do not want to read it every time a variable is used):
def policy @@policy ||= File.read(RAILS_ROOT + '/config/my_policy.txt') end
If you need something more elegant for configuration, check configatronic .
source share