Class: QuickBase::EventNotifier::Notification
- Inherits:
-
Object
- Object
- QuickBase::EventNotifier::Notification
- Defined in:
- lib/QuickBaseEventNotifier.rb
Overview
What to do when a TableEvent has occurred
Instance Attribute Summary collapse
-
#beep ⇒ Object
readonly
Returns the value of attribute beep.
-
#launchBrowser ⇒ Object
readonly
Returns the value of attribute launchBrowser.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(beep = true, message = "A QuickBase event has occurred.", title = "QuickBase Event", launchBrowser = true) ⇒ Notification
constructor
A new instance of Notification.
- #overrideDefaultTitleAndMessage(title, withThis) ⇒ Object
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,="A QuickBase event has occurred.",title="QuickBase Event",launchBrowser=true) if beep or @beep = beep @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
#beep ⇒ Object (readonly)
Returns the value of attribute beep.
347 348 349 |
# File 'lib/QuickBaseEventNotifier.rb', line 347 def beep @beep end |
#launchBrowser ⇒ Object (readonly)
Returns the value of attribute launchBrowser.
347 348 349 |
# File 'lib/QuickBaseEventNotifier.rb', line 347 def launchBrowser @launchBrowser end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
347 348 349 |
# File 'lib/QuickBaseEventNotifier.rb', line 347 def @message end |
#title ⇒ Object (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 |