Class Irc::Keyword |
|
![]() |
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 |
Attributes |
: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
restore(str) |
deserialize the stringified form to an object
unescape(str) |
unescape special words/characters in a keyword
escape(str) |
escape special words/characters in a keyword
Public Instance methods |
to_s() |
pick a random value for this keyword and return it
desc() |
describe the keyword (show all values without interpolation)
dump() |
return the keyword in a stringified form ready for storage
<<(values) |
values: | array of values to add |
add values to a keyword