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
.
418 419 420 |
# File 'lib/utils/irb.rb', line 418 def >>(filename) File.secure_write(filename, self) end |
#|(cmd) ⇒ Object
Pipe this string into cmd
.
409 410 411 412 413 414 415 |
# File 'lib/utils/irb.rb', line 409 def |(cmd) IO.popen(cmd, 'w+') do |f| f.write self f.close_write return f.read end end |