Class: Rubirai::ForwardMessage

Inherits:
Message
  • Object
show all
Defined in:
lib/rubirai/messages/message.rb

Defined Under Namespace

Classes: Node

Instance Attribute Summary

Attributes inherited from Message

#bot, #type

Instance Method Summary collapse

Methods inherited from Message

AtAllMessage, AtMessage, FaceMessage, PlainMessage, QuoteMessage, all_types, build_from, check_type, get_msg_klass, metaclass, set_message, #to_h, to_message

Constructor Details

#initialize(hash, bot = nil) ⇒ ForwardMessage

Returns a new instance of ForwardMessage.



281
282
283
284
285
286
287
288
289
290
# File 'lib/rubirai/messages/message.rb', line 281

def initialize(hash, bot = nil)
  super :Forward, bot
  @title = hash['title']
  @brief = hash['brief']
  @source = hash['source']
  @summary = hash['summary']
  @node_list = hash['nodeList'].each do |chain|
    Node.new chain, bot
  end
end