Class: Querly::Rule

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, scope: :nil) ⇒ Rule

Returns a new instance of Rule.



13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/querly/rule.rb', line 13

def initialize(id:, scope: :nil)
  @id = id
  @scope = scope

  @patterns = []
  @messages = []
  @justifications = []
  @before_examples = []
  @after_examples = []
  @tags = Set.new
  @scope = scope
end

Instance Attribute Details

#after_examplesObject (readonly)

Returns the value of attribute after_examples.



9
10
11
# File 'lib/querly/rule.rb', line 9

def after_examples
  @after_examples
end

#before_examplesObject (readonly)

Returns the value of attribute before_examples.



8
9
10
# File 'lib/querly/rule.rb', line 8

def before_examples
  @before_examples
end

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#justificationsObject (readonly)

Returns the value of attribute justifications.



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

def justifications
  @justifications
end

#messagesObject (readonly)

Returns the value of attribute messages.



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

def messages
  @messages
end

#patternsObject (readonly)

Returns the value of attribute patterns.



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

def patterns
  @patterns
end

#scopeObject (readonly)

Returns the value of attribute scope.



11
12
13
# File 'lib/querly/rule.rb', line 11

def scope
  @scope
end

#tagsObject (readonly)

Returns the value of attribute tags.



10
11
12
# File 'lib/querly/rule.rb', line 10

def tags
  @tags
end