Class: S2D::Transports::Prowler
- Includes:
- Configuration
- Defined in:
- lib/s2d/transports/prowler.rb
Instance Attribute Summary
Attributes inherited from Transport
Instance Method Summary collapse
-
#attributes ⇒ Object
Config wizard uses this information to collect required and optional config parameters.
- #deliver(message) ⇒ Object
-
#initialize(config) ⇒ Prowler
constructor
A new instance of Prowler.
Methods inherited from Transport
Constructor Details
#initialize(config) ⇒ Prowler
Returns a new instance of Prowler.
6 7 8 9 10 |
# File 'lib/s2d/transports/prowler.rb', line 6 def initialize(config) super(config) ::Prowler.logger.level = Logger::WARN @prowler = ::Prowler.new(:application => $0, :api_key => config[:api_key]) end |
Instance Method Details
#attributes ⇒ Object
Config wizard uses this information to collect required and optional config parameters
20 21 22 23 24 |
# File 'lib/s2d/transports/prowler.rb', line 20 def attributes [ MandatoryAttribute.new(:api_key, 'API key for prowlapp.com'), OptionalAttribute.new(:application, 'Application name to be passed to Prowl', $0), ] end |
#deliver(message) ⇒ Object
12 13 14 |
# File 'lib/s2d/transports/prowler.rb', line 12 def deliver() @prowler.notify(.subject, .body) end |