Sha256: 7c547f07c8f8b179026d870371bbd2a3b2eb7368fdae53a5d86a936efb49e8f6
Contents?: true
Size: 609 Bytes
Versions: 6
Compression:
Stored size: 609 Bytes
Contents
module Jackfs class FileAdapter attr_accessor :location, :app_root, :app_env def initialize(app_root, app_env) @app_root = app_root @app_env = app_env begin @location = YAML.load_file(File.join(@app_root, Jackfs::FileStore::CONFIG_FILE))[@app_env.to_s]["location"] rescue raise InvalidFileStore end end def store(this_file, name) File.open(File.join(@app_root, @location, name), 'w') { |file| file.write this_file.read } name end def get(name) File.open(File.join(app_root, @location, name), 'r') end end end
Version data entries
6 entries across 6 versions & 1 rubygems