Class Irc::Keyword
In: lib/rbot/keywords.rb
Parent: Object

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

Methods

<<   desc   dump   escape   new   restore   to_s   unescape  

Attributes

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

Public Class methods

escape special words/characters in a keyword

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

Public Instance methods

values:array of values to add

add values to a keyword

describe the keyword (show all values without interpolation)

return the keyword in a stringified form ready for storage

pick a random value for this keyword and return it

[Validate]