Sha256: e7b534c5a49aa2e90f6f741ffd9997e7ed87e466932836f27abc25b61cc2eb44

Contents?: true

Size: 315 Bytes

Versions: 2

Compression:

Stored size: 315 Bytes

Contents

class Alerty
  class Plugin
    class File
      def initialize(config)
        raise ConfigError.new('file: path is not configured') unless config.path
        @path = config.path
      end

      def alert(msg)
        ::File.open(@path, 'a') do |io|
          io.puts msg
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
alerty-0.0.2 lib/alerty/plugin/file.rb
alerty-0.0.1 lib/alerty/plugin/file.rb