Class: Turbo::Message

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Message

Returns a new instance of Message.



6
7
8
# File 'lib/turbo/message.rb', line 6

def initialize(options)
  self.content = options[:with]
end

Instance Attribute Details

#contentObject

Returns the value of attribute content.



4
5
6
# File 'lib/turbo/message.rb', line 4

def content
  @content
end

#queueObject

Returns the value of attribute queue.



4
5
6
# File 'lib/turbo/message.rb', line 4

def queue
  @queue
end

Instance Method Details

#clearObject



10
11
12
# File 'lib/turbo/message.rb', line 10

def clear
  self.content.delete
end

#to_sObject



14
15
16
# File 'lib/turbo/message.rb', line 14

def to_s
  self.content.to_s
end