Class: Danger::DangerfileLocalOnlyPlugin
- Defined in:
- lib/danger/danger_core/plugins/dangerfile_local_only_plugin.rb
Overview
Handles interacting with local only plugin inside a Dangerfile. It is support plugin for dry_run command and does not expose any methods. But you can still use other plugins like git
Class Method Summary collapse
-
.instance_name ⇒ String
The instance name used in the Dangerfile.
-
.new(dangerfile) ⇒ Object
So that this init can fail.
Instance Method Summary collapse
-
#initialize(dangerfile) ⇒ DangerfileLocalOnlyPlugin
constructor
A new instance of DangerfileLocalOnlyPlugin.
Methods inherited from Plugin
all_plugins, clear_external_plugins, inherited, #method_missing
Constructor Details
#initialize(dangerfile) ⇒ DangerfileLocalOnlyPlugin
Returns a new instance of DangerfileLocalOnlyPlugin.
30 31 32 33 34 |
# File 'lib/danger/danger_core/plugins/dangerfile_local_only_plugin.rb', line 30 def initialize(dangerfile) super(dangerfile) @local_repo = dangerfile.env.request_source end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Danger::Plugin
Class Method Details
.instance_name ⇒ String
The instance name used in the Dangerfile
39 40 41 |
# File 'lib/danger/danger_core/plugins/dangerfile_local_only_plugin.rb', line 39 def self.instance_name "local_repo" end |
.new(dangerfile) ⇒ Object
So that this init can fail.
24 25 26 27 28 |
# File 'lib/danger/danger_core/plugins/dangerfile_local_only_plugin.rb', line 24 def self.new(dangerfile) return nil if dangerfile.env.request_source.class != Danger::RequestSources::LocalOnly super end |