Module: Utils::IRB::String
- Included in:
- String
- Defined in:
- lib/utils/irb.rb
Instance Method Summary collapse
-
#>>(filename) ⇒ Object
Write this string into file
filename
. -
#|(cmd) ⇒ Object
Pipe this string into
cmd
.
Instance Method Details
#>>(filename) ⇒ Object
Write this string into file filename
.
430 431 432 |
# File 'lib/utils/irb.rb', line 430 def >>(filename) File.secure_write(filename, self) end |
#|(cmd) ⇒ Object
Pipe this string into cmd
.
421 422 423 424 425 426 427 |
# File 'lib/utils/irb.rb', line 421 def |(cmd) IO.popen(cmd, 'w+') do |f| f.write self f.close_write return f.read end end |