class Guard::Migrate::Notify
Public Class Methods
new(result)
click to toggle source
# File lib/guard/migrate/notify.rb, line 4 def initialize(result) @result = result end
Public Instance Methods
notify()
click to toggle source
# File lib/guard/migrate/notify.rb, line 8 def notify Guard::Compat::UI.notify( message, title: 'Database Migrations', image: image ) end
Private Instance Methods
image()
click to toggle source
# File lib/guard/migrate/notify.rb, line 27 def image @result ? :success : :failure end
message()
click to toggle source
# File lib/guard/migrate/notify.rb, line 18 def message case @result when 'reset' then 'The database has been reset' when 'seed' then 'The database has been seeded' when true then 'Migrations have been applied successfully' else 'There was an error running migrations' end end