Method: RIO::IF::GrandeStream#strip

Defined in:
lib/rio/if/grande_stream.rb

#strip(arg = true, &block) ⇒ Object

Sets the Rio to strip lines and returns the Rio

When called with a block, behaves as if strip.each(&block) had been called

strip causes lines returned by each, to_a, readlines, readline, gets, each_line etc. to be stripped with String#strip before iterated over or assigned

ans = rio(?-).print("A Prompt> ").strip.gets # prompt the user

See also #chomp



625
# File 'lib/rio/if/grande_stream.rb', line 625

def strip(arg=true,&block) target.strip(arg,&block); self end