module Secretly

Constants

VERSION

Public Class Methods

fetch( where, lookup ) click to toggle source
# File lib/secretly.rb, line 5
def self.fetch( where, lookup )
  send "fetch_from_#{where}", lookup
end
fetch_from_file( filepath ) click to toggle source
# File lib/secretly.rb, line 9
def self.fetch_from_file( filepath )
  filepath = File.expand_path( filepath )
  raise "Secret file '#{filepath} does not exist" unless File.exists?( filepath )
  File.read( filepath ).strip
end