Module: Irbtab
Constant Summary collapse
- Version =
'0.0.5'
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
Instance Method Details
#copy(args) ⇒ Object
35 36 37 38 39 40 41 42 43 |
# File 'lib/irbtab.rb', line 35 def copy(args) stdin = CSV.generate({:col_sep => "\t"}) do |csv| args.each { |i| csv << i } end systemu(Copy, :stdin => stdin) stdin end |
#irbt(*args) ⇒ Object
51 52 53 |
# File 'lib/irbtab.rb', line 51 def irbt(*args) args.size==0 ? paste(*args) : copy(*args) end |
#paste(*args) ⇒ Object
45 46 47 48 49 |
# File 'lib/irbtab.rb', line 45 def paste(*args) stdout = '' systemu(Paste, :stdout => stdout) CSV.parse(stdout, { :col_sep => "\t" }) end |