Class Irc::Keyword
In: rbot/keywords.rb
Parent: Object
Class: JoinMessage Class: PartMessage Class: Plugins Class: KickMessage Class: IrcAuth Class: IRCChannel Class: IrcSocket Class: BotConfig Class: Keywords Class: BotRegistryAccessor Class: IrcClient Class: DBHash Class: Language Class: TopicMessage Class: QuitMessage Class: PrivMessage Class: UserMessage Class: NoticeMessage Class: IrcBot Class: BasicUserMessage Class: NickMessage Class: Plugin Class: BotRegistry Class: Keyword Class: DBTree Module: Irc

Keyword class

Encapsulates a keyword ("foo is bar" is a keyword called foo, with type is, and has a single value of bar). Keywords can have multiple values, to_s() will choose one at random

<<    desc    dump    escape    new    restore    to_s    unescape   
:type  [R] 

type of keyword (e.g. "is" or "are")

Public Class methods
new(type, values)
type:type of keyword (e.g "is" or "are")
values:array of values

create a keyword of type type with values values


deserialize the stringified form to an object


unescape special words/characters in a keyword


escape special words/characters in a keyword

Public Instance methods

pick a random value for this keyword and return it


describe the keyword (show all values without interpolation)


return the keyword in a stringified form ready for storage

values:array of values to add

add values to a keyword