Class: Coopy::TableIO

Inherits:
Object
  • Object
show all
Defined in:
lib/lib/coopy/table_io.rb

Instance Method Summary collapse

Constructor Details

#initializeTableIO

Returns a new instance of TableIO.



7
8
# File 'lib/lib/coopy/table_io.rb', line 7

def initialize
end

Instance Method Details

#argsObject



23
24
25
# File 'lib/lib/coopy/table_io.rb', line 23

def args 
  HxSys.args
end

#asyncObject



44
45
46
# File 'lib/lib/coopy/table_io.rb', line 44

def async 
  false
end

#command(cmd, args) ⇒ Object



35
36
37
38
39
40
41
42
# File 'lib/lib/coopy/table_io.rb', line 35

def command(cmd,args)
  begin
    return HxSys.command(cmd,args)
  rescue => e
    e = hx_rescued(e)
    return 1
  end
end

#exists(path) ⇒ Object



48
49
50
# File 'lib/lib/coopy/table_io.rb', line 48

def exists(path)
  File.exist?(path)
end

#get_content(name) ⇒ Object



14
15
16
# File 'lib/lib/coopy/table_io.rb', line 14

def get_content(name)
  ::Sys::Io::HxFile.get_content(name)
end

#is_ttyObject



56
57
58
59
# File 'lib/lib/coopy/table_io.rb', line 56

def is_tty 
  return true if HxSys.get_env("GIT_PAGER_IN_USE") == "true"
  false
end

#is_tty_knownObject



52
53
54
# File 'lib/lib/coopy/table_io.rb', line 52

def is_tty_known 
  false
end

#open_sqlite_database(path) ⇒ Object



61
62
63
# File 'lib/lib/coopy/table_io.rb', line 61

def open_sqlite_database(path)
  nil
end

#save_content(name, txt) ⇒ Object



18
19
20
21
# File 'lib/lib/coopy/table_io.rb', line 18

def save_content(name,txt)
  ::Sys::Io::HxFile.save_content(name,txt)
  true
end

#send_to_browser(html) ⇒ Object



65
66
67
# File 'lib/lib/coopy/table_io.rb', line 65

def send_to_browser(html)
  puts "do not know how to send to browser in this language"
end

#validObject



10
11
12
# File 'lib/lib/coopy/table_io.rb', line 10

def valid 
  true
end

#write_stderr(txt) ⇒ Object



31
32
33
# File 'lib/lib/coopy/table_io.rb', line 31

def write_stderr(txt)
  HxSys.stderr.write_string(txt)
end

#write_stdout(txt) ⇒ Object



27
28
29
# File 'lib/lib/coopy/table_io.rb', line 27

def write_stdout(txt)
  HxSys.stdout.write_string(txt)
end