Sha256: 88738f6965c9785b90aa6b7103b4aa4306695f357f45f8ea13f1b551c116c37b
Contents?: true
Size: 715 Bytes
Versions: 1
Compression:
Stored size: 715 Bytes
Contents
module Shellject module Tasks # Loads, decrypts, and outputs a shelljection class Load include CryptoTask attr_reader :save_directory, :name def initialize(save_directory, name) @save_directory = save_directory @name = name end def call ensure_readable file = File.open path STDOUT.print crypto.decrypt(file) ensure file.close if file end private def ensure_readable raise ShelljectError, "Could not read file #{path}" unless readable? end def readable? path.readable? end def path @path ||= save_directory.path_for name end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
shellject-1.0.1 | lib/shellject/tasks/load.rb |