Class: Goodcheck::Rule

Inherits:
Object
  • Object
show all
Defined in:
lib/goodcheck/rule.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, triggers:, message:, justifications:, severity: nil) ⇒ Rule

Returns a new instance of Rule.



9
10
11
12
13
14
15
# File 'lib/goodcheck/rule.rb', line 9

def initialize(id:, triggers:, message:, justifications:, severity: nil)
  @id = id
  @triggers = triggers
  @message = message
  @justifications = justifications
  @severity = severity
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'lib/goodcheck/rule.rb', line 3

def id
  @id
end

#justificationsObject (readonly)

Returns the value of attribute justifications.



6
7
8
# File 'lib/goodcheck/rule.rb', line 6

def justifications
  @justifications
end

#messageObject (readonly)

Returns the value of attribute message.



5
6
7
# File 'lib/goodcheck/rule.rb', line 5

def message
  @message
end

#severityObject (readonly)

Returns the value of attribute severity.



7
8
9
# File 'lib/goodcheck/rule.rb', line 7

def severity
  @severity
end

#triggersObject (readonly)

Returns the value of attribute triggers.



4
5
6
# File 'lib/goodcheck/rule.rb', line 4

def triggers
  @triggers
end