Class: Twiglet::Message
- Inherits:
-
Hash
- Object
- Hash
- Twiglet::Message
- Defined in:
- lib/twiglet/message.rb
Instance Method Summary collapse
-
#initialize(msg) ⇒ Message
constructor
A new instance of Message.
Constructor Details
#initialize(msg) ⇒ Message
Returns a new instance of Message.
3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/twiglet/message.rb', line 3 def initialize(msg) super case msg when String self[:message] = msg when Hash replace(msg.transform_keys!(&:to_sym)) else super end end |