Sha256: c27dc7e88df8960f9d7a6a6ecb30191b950f8fd2fc6f3e29d88947cff670ff9f
Contents?: true
Size: 584 Bytes
Versions: 2
Compression:
Stored size: 584 Bytes
Contents
module Pipio class AutoOrXmlMessageCreator def initialize(text, time, sender_screen_name, sender_alias, is_auto_reply) @text = text @time = time @sender_screen_name = sender_screen_name @sender_alias = sender_alias @is_auto_reply = is_auto_reply end def create if auto_reply? AutoReplyMessage.new(@sender_screen_name, @time, @sender_alias, @text) else XMLMessage.new(@sender_screen_name, @time, @sender_alias, @text) end end private def auto_reply? !! @is_auto_reply end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pipio-0.0.2 | lib/pipio/message_creators/auto_or_xml_message_creator.rb |
pipio-0.0.1 | lib/pipio/message_creators/auto_or_xml_message_creator.rb |