Class: SSCBot::ChatLogFile
- Includes:
- SSCBot::ChatLog::MessageParsable
- Defined in:
- lib/ssc.bot/chat_log_file.rb
Overview
Constant Summary
Constants included from SSCBot::ChatLog::MessageParsable
SSCBot::ChatLog::MessageParsable::MAX_NAMELEN
Constants inherited from SSCFile
SSCFile::DEFAULT_BUFFER_LEN, SSCFile::DEFAULT_ENCODING, SSCFile::DEFAULT_MODE, SSCFile::DEFAULT_SEPARATOR
Instance Attribute Summary
Attributes included from SSCBot::ChatLog::MessageParsable
Instance Method Summary collapse
-
#initialize(filename, mode = DEFAULT_MODE, parser: ChatLog::MessageParser.new, **file_kargs) ⇒ ChatLogFile
constructor
A new instance of ChatLogFile.
- #parse_line ⇒ Object
Methods inherited from SSCFile
clear_content, #read_uline, #seek_to_end, soft_touch
Constructor Details
#initialize(filename, mode = DEFAULT_MODE, parser: ChatLog::MessageParser.new, **file_kargs) ⇒ ChatLogFile
Returns a new instance of ChatLogFile.
27 28 29 30 31 |
# File 'lib/ssc.bot/chat_log_file.rb', line 27 def initialize(filename,mode=DEFAULT_MODE,parser: ChatLog::MessageParser.new,**file_kargs) super(filename,mode,**file_kargs) @parser = parser end |
Instance Method Details
#parse_line ⇒ Object
33 34 35 36 37 |
# File 'lib/ssc.bot/chat_log_file.rb', line 33 def parse_line line = read_uline return line.nil? ? nil : parse(line) end |