Module: Txray::Rules
- Defined in:
- lib/txray/rule.rb
Class Method Summary collapse
- .[](id) ⇒ Object
- .all ⇒ Object
- .ids ⇒ Object
- .register(id:, category:, severity:, message:, remedy:) ⇒ Object
Class Method Details
.[](id) ⇒ Object
13 |
# File 'lib/txray/rule.rb', line 13 def self.[](id) = all.fetch(id) |
.all ⇒ Object
7 |
# File 'lib/txray/rule.rb', line 7 def self.all = @all ||= {} |
.ids ⇒ Object
14 |
# File 'lib/txray/rule.rb', line 14 def self.ids = all.keys |
.register(id:, category:, severity:, message:, remedy:) ⇒ Object
9 10 11 |
# File 'lib/txray/rule.rb', line 9 def self.register(id:, category:, severity:, message:, remedy:) all[id] = Rule.new(id: id, category: category, severity: severity, message: , remedy: remedy) end |