Class: FileMessage
- Inherits:
-
Object
- Object
- FileMessage
- Defined in:
- lib/file_message.rb
Overview
FileMessage - simple class to write a message
Instance Attribute Summary collapse
-
#message_name ⇒ Object
readonly
Returns the value of attribute message_name.
Instance Method Summary collapse
-
#initialize(message_name) ⇒ FileMessage
constructor
A new instance of FileMessage.
- #write_message(queue_location, message) ⇒ Object
Constructor Details
#initialize(message_name) ⇒ FileMessage
Returns a new instance of FileMessage.
4 5 6 |
# File 'lib/file_message.rb', line 4 def initialize() @message_name = end |
Instance Attribute Details
#message_name ⇒ Object (readonly)
Returns the value of attribute message_name.
3 4 5 |
# File 'lib/file_message.rb', line 3 def @message_name end |
Instance Method Details
#write_message(queue_location, message) ⇒ Object
8 9 10 11 12 |
# File 'lib/file_message.rb', line 8 def (queue_location, ) File.open(queue_location + '/' + @message_name, 'w') do |file| file.puts end end |