Class: NServer::Message
- Inherits:
-
Object
- Object
- NServer::Message
- Defined in:
- lib/nserver.rb
Constant Summary collapse
- PRIORITIES =
[:low, :normal, :critical]
Instance Attribute Summary collapse
-
#priority ⇒ Object
readonly
Returns the value of attribute priority.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(text = "", priority = :normal, title = nil) ⇒ Message
constructor
A new instance of Message.
Constructor Details
#initialize(text = "", priority = :normal, title = nil) ⇒ Message
Returns a new instance of Message.
231 232 233 234 235 |
# File 'lib/nserver.rb', line 231 def initialize( text = "", priority = :normal, title = nil ) @text = text @priority = ( PRIORITIES.index( priority ) or 1 ) @title = title end |
Instance Attribute Details
#priority ⇒ Object (readonly)
Returns the value of attribute priority.
229 230 231 |
# File 'lib/nserver.rb', line 229 def priority @priority end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
227 228 229 |
# File 'lib/nserver.rb', line 227 def text @text end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
228 229 230 |
# File 'lib/nserver.rb', line 228 def title @title end |