Class: NServer::Message

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

Constant Summary collapse

PRIORITIES =
[:low, :normal, :critical]

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#priorityObject (readonly)

Returns the value of attribute priority.



229
230
231
# File 'lib/nserver.rb', line 229

def priority
  @priority
end

#textObject (readonly)

Returns the value of attribute text.



227
228
229
# File 'lib/nserver.rb', line 227

def text
  @text
end

#titleObject (readonly)

Returns the value of attribute title.



228
229
230
# File 'lib/nserver.rb', line 228

def title
  @title
end