Class: Querly::Rule
- Inherits:
-
Object
- Object
- Querly::Rule
- Defined in:
- lib/querly/rule.rb
Instance Attribute Summary collapse
-
#after_examples ⇒ Object
readonly
Returns the value of attribute after_examples.
-
#before_examples ⇒ Object
readonly
Returns the value of attribute before_examples.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#justifications ⇒ Object
readonly
Returns the value of attribute justifications.
-
#messages ⇒ Object
readonly
Returns the value of attribute messages.
-
#patterns ⇒ Object
readonly
Returns the value of attribute patterns.
-
#scope ⇒ Object
readonly
Returns the value of attribute scope.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
Instance Method Summary collapse
-
#initialize(id:, scope: :nil) ⇒ Rule
constructor
A new instance of Rule.
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_examples ⇒ Object (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_examples ⇒ Object (readonly)
Returns the value of attribute before_examples.
8 9 10 |
# File 'lib/querly/rule.rb', line 8 def before_examples @before_examples end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/querly/rule.rb', line 3 def id @id end |
#justifications ⇒ Object (readonly)
Returns the value of attribute justifications.
7 8 9 |
# File 'lib/querly/rule.rb', line 7 def justifications @justifications end |
#messages ⇒ Object (readonly)
Returns the value of attribute messages.
6 7 8 |
# File 'lib/querly/rule.rb', line 6 def @messages end |
#patterns ⇒ Object (readonly)
Returns the value of attribute patterns.
4 5 6 |
# File 'lib/querly/rule.rb', line 4 def patterns @patterns end |
#scope ⇒ Object (readonly)
Returns the value of attribute scope.
11 12 13 |
# File 'lib/querly/rule.rb', line 11 def scope @scope end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
10 11 12 |
# File 'lib/querly/rule.rb', line 10 def @tags end |