Class: Danger::PluginLinter::Rule

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#descriptionObject

Returns the value of attribute description.



5
6
7
# File 'lib/danger/plugin_support/plugin_linter.rb', line 5

def description
  @description
end

#functionObject

Returns the value of attribute function.



5
6
7
# File 'lib/danger/plugin_support/plugin_linter.rb', line 5

def function
  @function
end

#metadataObject

Returns the value of attribute metadata.



5
6
7
# File 'lib/danger/plugin_support/plugin_linter.rb', line 5

def 
  @metadata
end

#modifierObject

Returns the value of attribute modifier.



5
6
7
# File 'lib/danger/plugin_support/plugin_linter.rb', line 5

def modifier
  @modifier
end

#refObject

Returns the value of attribute ref.



5
6
7
# File 'lib/danger/plugin_support/plugin_linter.rb', line 5

def ref
  @ref
end

#titleObject

Returns the value of attribute title.



5
6
7
# File 'lib/danger/plugin_support/plugin_linter.rb', line 5

def title
  @title
end

#typeObject

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_toObject



15
16
17
# File 'lib/danger/plugin_support/plugin_linter.rb', line 15

def object_applied_to
  [:name].to_s.bold + " (" + type + ")"
end