Class: QuickBase::EventNotifier::Notification

Inherits:
Object
  • Object
show all
Defined in:
lib/QuickBaseEventNotifier.rb

Overview

What to do when a TableEvent has occurred

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(beep = true, message = "A QuickBase event has occurred.", title = "QuickBase Event", launchBrowser = true) ⇒ Notification

Returns a new instance of Notification.



349
350
351
352
353
354
355
356
357
358
359
360
# File 'lib/QuickBaseEventNotifier.rb', line 349

def initialize(beep=true,message="A QuickBase event has occurred.",title="QuickBase Event",launchBrowser=true)
   if beep or message
      @beep = beep
      @message = message
      @message = "" if @message.nil?
      @title = title
      @title = "" if @title.nil?
      @launchBrowser = launchBrowser
   else
      raise "Notification must be a beep and/or a message" 
   end
end

Instance Attribute Details

#beepObject (readonly)

Returns the value of attribute beep.



347
348
349
# File 'lib/QuickBaseEventNotifier.rb', line 347

def beep
  @beep
end

#launchBrowserObject (readonly)

Returns the value of attribute launchBrowser.



347
348
349
# File 'lib/QuickBaseEventNotifier.rb', line 347

def launchBrowser
  @launchBrowser
end

#messageObject (readonly)

Returns the value of attribute message.



347
348
349
# File 'lib/QuickBaseEventNotifier.rb', line 347

def message
  @message
end

#titleObject (readonly)

Returns the value of attribute title.



347
348
349
# File 'lib/QuickBaseEventNotifier.rb', line 347

def title
  @title
end

Instance Method Details

#overrideDefaultTitleAndMessage(title, withThis) ⇒ Object



362
363
364
365
366
367
368
# File 'lib/QuickBaseEventNotifier.rb', line 362

def overrideDefaultTitleAndMessage(title,withThis)
   if @message == "A QuickBase event has occurred."
      @message = withThis
      @title = title
   end
   return @title,@message
end