Class: Coopy::TableIO
- Inherits:
-
Object
- Object
- Coopy::TableIO
- Defined in:
- lib/lib/coopy/table_io.rb
Instance Method Summary collapse
- #args ⇒ Object
- #async ⇒ Object
- #command(cmd, args) ⇒ Object
- #exists(path) ⇒ Object
- #get_content(name) ⇒ Object
-
#initialize ⇒ TableIO
constructor
A new instance of TableIO.
- #is_tty ⇒ Object
- #is_tty_known ⇒ Object
- #open_sqlite_database(path) ⇒ Object
- #save_content(name, txt) ⇒ Object
- #send_to_browser(html) ⇒ Object
- #valid ⇒ Object
- #write_stderr(txt) ⇒ Object
- #write_stdout(txt) ⇒ Object
Constructor Details
#initialize ⇒ TableIO
Returns a new instance of TableIO.
7 8 |
# File 'lib/lib/coopy/table_io.rb', line 7 def initialize end |
Instance Method Details
#args ⇒ Object
23 24 25 |
# File 'lib/lib/coopy/table_io.rb', line 23 def args HxSys.args end |
#async ⇒ Object
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_tty ⇒ Object
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_known ⇒ Object
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 |
#valid ⇒ Object
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 |