class Kernel::PoorsManStringBuilder
Attributes
result[R]
Public Class Methods
new()
click to toggle source
# File lib/guerrilla_patch/kernel.rb, line 32 def initialize @result = '' end
Public Instance Methods
add(item)
click to toggle source
# File lib/guerrilla_patch/kernel.rb, line 36 def add(item) @result << item.to_s end
Also aliased as: always
when(item, &block)
click to toggle source
# File lib/guerrilla_patch/kernel.rb, line 45 def when(item, &block) return unless item @result << Kernel.when_present(item, &block).to_s end
when_present(item, &block)
click to toggle source
# File lib/guerrilla_patch/kernel.rb, line 41 def when_present(item, &block) @result << Kernel.when_present(item, &block).to_s end