Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/allison.rb
Overview
RDoc workarounds
Instance Method Summary collapse
Instance Method Details
#if_exists(item = nil) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/allison.rb', line 4 def if_exists (item = nil) unless item self unless self =~ /(%(\w+)%)/ "\nIF:#{$2}\n#{self}\nENDIF:#{$2}\n" else "\nIF:#{item}\n#{self}\nENDIF:#{item}\n" end end |
#loop(item) ⇒ Object
12 13 14 |
# File 'lib/allison.rb', line 12 def loop(item) "\nSTART:#{item}\n#{self}\nEND:#{item}\n" end |