Class: Danger::PluginLinter::Rule
- Inherits:
-
Object
- Object
- Danger::PluginLinter::Rule
- Defined in:
- lib/danger/plugin_support/plugin_linter.rb
Overview
An internal class that is used to represent a rule for the linter.
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#function ⇒ Object
Returns the value of attribute function.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#modifier ⇒ Object
Returns the value of attribute modifier.
-
#ref ⇒ Object
Returns the value of attribute ref.
-
#title ⇒ Object
Returns the value of attribute title.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(modifier, ref, title, description, function) ⇒ Rule
constructor
A new instance of Rule.
- #object_applied_to ⇒ Object
Constructor Details
#initialize(modifier, ref, title, description, function) ⇒ Rule
Returns a new instance of Rule.
7 8 9 10 11 12 13 |
# File 'lib/danger/plugin_support/plugin_linter.rb', line 7 def initialize(modifier, ref, title, description, function) @modifier = modifier @title = title @description = description @function = function @ref = ref end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
5 6 7 |
# File 'lib/danger/plugin_support/plugin_linter.rb', line 5 def description @description end |
#function ⇒ Object
Returns the value of attribute function.
5 6 7 |
# File 'lib/danger/plugin_support/plugin_linter.rb', line 5 def function @function end |
#metadata ⇒ Object
Returns the value of attribute metadata.
5 6 7 |
# File 'lib/danger/plugin_support/plugin_linter.rb', line 5 def @metadata end |
#modifier ⇒ Object
Returns the value of attribute modifier.
5 6 7 |
# File 'lib/danger/plugin_support/plugin_linter.rb', line 5 def modifier @modifier end |
#ref ⇒ Object
Returns the value of attribute ref.
5 6 7 |
# File 'lib/danger/plugin_support/plugin_linter.rb', line 5 def ref @ref end |
#title ⇒ Object
Returns the value of attribute title.
5 6 7 |
# File 'lib/danger/plugin_support/plugin_linter.rb', line 5 def title @title end |
#type ⇒ Object
Returns the value of attribute type.
5 6 7 |
# File 'lib/danger/plugin_support/plugin_linter.rb', line 5 def type @type end |
Instance Method Details
#object_applied_to ⇒ Object
15 16 17 |
# File 'lib/danger/plugin_support/plugin_linter.rb', line 15 def object_applied_to [:name].to_s.bold + " (" + type + ")" end |