Class: Danger::PluginLint
- Inherits:
-
CLAide::Command::Plugins
- Object
- CLAide::Command::Plugins
- Danger::PluginLint
- Defined in:
- lib/danger/commands/plugins/plugin_lint.rb
Instance Attribute Summary collapse
-
#cork ⇒ Object
Returns the value of attribute cork.
Instance Method Summary collapse
-
#initialize(argv) ⇒ PluginLint
constructor
A new instance of PluginLint.
- #run ⇒ Object
Constructor Details
#initialize(argv) ⇒ PluginLint
Returns a new instance of PluginLint.
11 12 13 14 15 16 |
# File 'lib/danger/commands/plugins/plugin_lint.rb', line 11 def initialize(argv) @refs = argv.arguments! unless argv.arguments.empty? @cork = Cork::Board.new(silent: argv.option("silent", false), verbose: argv.option("verbose", false)) super end |
Instance Attribute Details
#cork ⇒ Object
Returns the value of attribute cork.
9 10 11 |
# File 'lib/danger/commands/plugins/plugin_lint.rb', line 9 def cork @cork end |
Instance Method Details
#run ⇒ Object
30 31 32 33 34 35 36 37 38 |
# File 'lib/danger/commands/plugins/plugin_lint.rb', line 30 def run file_resolver = PluginFileResolver.new(@refs) paths = file_resolver.resolve_to_paths parser = PluginParser.new(paths) parser.parse json = parser.to_json cork.puts json end |