Class: Object

Inherits:
BasicObject
Defined in:
lib/sdbcli/sdb-runner.rb

Instance Method Summary collapse

Instance Method Details

#_(out) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'lib/sdbcli/sdb-runner.rb', line 5

def _(out)
  open(out, 'wb') do |f|
    if block_given?
      f.puts(yield(self))
    else
      f.puts(self.to_s)
    end
  end
end

#__(out) ⇒ Object



15
16
17
18
19
20
21
22
23
# File 'lib/sdbcli/sdb-runner.rb', line 15

def __(out)
  open(out, 'ab') do |f|
    if block_given?
      f.puts(yield(self))
    else
      f.puts(self.to_s)
    end
  end
end