Class: Mihari::Service
- Inherits:
-
Object
show all
- Defined in:
- lib/mihari/service.rb
Overview
Direct Known Subclasses
Rule, Mihari::Services::AlertCreator, Mihari::Services::AlertDestroyer, Mihari::Services::AlertGetter, Mihari::Services::ArtifactDestroyer, Mihari::Services::ArtifactEnricher, Mihari::Services::ArtifactGetter, Mihari::Services::AutonomousSystemBuilder, Mihari::Services::BaseSearcher, Mihari::Services::CPEBuilder, Mihari::Services::ConfigSearcher, Mihari::Services::DnsRecordBuilder, Mihari::Services::FeedParser, Mihari::Services::FeedReader, Mihari::Services::GeolocationBuilder, Mihari::Services::IPGetter, Mihari::Services::JbuilderRenderer, Mihari::Services::PortBuilder, Mihari::Services::ReverseDnsNameBuilder, Mihari::Services::RuleBuilder, Mihari::Services::RuleDestroyer, Mihari::Services::RuleGetter, Mihari::Services::RuleInitializer, Mihari::Services::TagDestroyer, Mihari::Services::WhoisRecordBuilder, Web::Endpoints::Rules::RuleCreateUpdater
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.call ⇒ Object
19
20
21
|
# File 'lib/mihari/service.rb', line 19
def call(...)
new.call(...)
end
|
.result ⇒ Object
23
24
25
|
# File 'lib/mihari/service.rb', line 23
def result(...)
new.result(...)
end
|
Instance Method Details
#call(*args, **kwargs) ⇒ Object
10
11
12
|
# File 'lib/mihari/service.rb', line 10
def call(*args, **kwargs)
raise NotImplementedError, "You must implement #{self.class}##{__method__}"
end
|
#result ⇒ Object
14
15
16
|
# File 'lib/mihari/service.rb', line 14
def result(...)
Try[StandardError] { call(...) }.to_result
end
|