class Danger::DangerBloaty
This is your plugin class. Any attributes or methods you expose here will be available from within your Dangerfile.
To be published on the Danger
plugins site, you will need to have the public interface documented. Danger
uses [YARD](yardoc.org/) for generating documentation from your plugin source, and you can verify by running `danger plugins lint` or `bundle exec rake spec`.
You should replace these comments with a public description of your library.
@example Ensure people are well warned about merging on Mondays
my_plugin.warn_on_mondays
@see Kenji Tayama/danger-bloaty @tags monday, weekends, time, rattata
Attributes
my_attribute[RW]
An attribute that you can read/write from your Dangerfile
@return [Array<String>]
Public Instance Methods
notify_bloaty()
click to toggle source
# File lib/bloaty/plugin.rb, line 37 def notify_bloaty result = `bloaty #{ENV['DANGER_BLOATY_APP_BINARY_PATH']}` markdown '<details><summary>bloaty result</summary>' markdown '```' markdown result markdown '```' markdown '</details>' end
warn_just_for_test()
click to toggle source
# File lib/bloaty/plugin.rb, line 33 def warn_just_for_test warn 'Just trying to test this danger plugin' end
warn_on_mondays()
click to toggle source
A method that you can call from your Dangerfile @return [Array<String>]
# File lib/bloaty/plugin.rb, line 29 def warn_on_mondays warn 'Trying to merge code on a Monday' if Date.today.wday == 1 end