module RIO::IF::String

Public Instance Methods

+(arg) click to toggle source

Create a Rio referencing Rio#to_str + arg.to_str

rio('afile') + '-0.1'   #=> rio('afile-0.1')
# File lib/rio/if/string.rb, line 40
def +(arg) target + arg end
gsub(re,string) click to toggle source

Create a new Rio referencing the result of applying ::String#gsub to the value returned by Rio#to_s. So:

ario.gsub(re,string)

is equivelent to

rio(ario.to_s.gsub(re,string))

See also sub +

# File lib/rio/if/string.rb, line 60
def gsub(re,string) target.gsub(re,string) end
sub(re,string) click to toggle source

Create a new Rio referencing the result of applying ::String#sub to the value returned by Rio#to_s. So:

ario.sub(re,string)

is equivelent to

rio(ario.to_s.sub(re,string))

See also gsub, +

# File lib/rio/if/string.rb, line 50
def sub(re,string) target.sub(re,string) end