Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/room.rb
Instance Method Summary collapse
Instance Method Details
#commandify ⇒ Object
21 22 23 |
# File 'lib/room.rb', line 21 def commandify Regexp.compile("^" + Regexp.escape(self.gsub("_", " ")).gsub("XXX", "(.+)") + "$") end |
#|(o) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/room.rb', line 13 def |(o) if o.nil? self else self + "\n" + o end end |