Class: OpenLogCleaner::Message

Inherits:
Struct
  • Object
show all
Defined in:
lib/openlogcleaner/message.rb,
lib/openlogcleaner/message.rb

Direct Known Subclasses

Emote, Say

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#colorObject

Returns the value of attribute color

Returns:

  • (Object)

    the current value of color



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

def color
  @color
end

#contentObject

Returns the value of attribute content

Returns:

  • (Object)

    the current value of content



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

def content
  @content
end

#countObject

Returns the value of attribute count

Returns:

  • (Object)

    the current value of count



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

def count
  @count
end

#nickObject

Returns the value of attribute nick

Returns:

  • (Object)

    the current value of nick



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

def nick
  @nick
end

Instance Method Details

#is_ooc?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/openlogcleaner/message.rb', line 7

def is_ooc?
  content =~ /^\(\(?[^)]+\)\)?/ or content =~ /^\[\d+d/
end

#styleObject



11
12
13
# File 'lib/openlogcleaner/message.rb', line 11

def style
  "color: #{color};"
end