Class: Breathing::Cli

Inherits:
Thor
  • Object
show all
Defined in:
lib/breathing/cli.rb

Instance Method Summary collapse

Instance Method Details

#clearObject



23
24
25
# File 'lib/breathing/cli.rb', line 23

def clear
  Breathing.clear
end

#exportObject



29
30
31
# File 'lib/breathing/cli.rb', line 29

def export
  Breathing.export
end

#installObject



11
12
13
# File 'lib/breathing/cli.rb', line 11

def install
  Breathing.install
end

#outObject



37
38
39
40
41
42
43
44
# File 'lib/breathing/cli.rb', line 37

def out
  if options[:table] == 'terminal_table'
    Breathing.render_terminal_table(table_name: options[:table], id: options[:id].to_i)
  else
    # TODO
    # Breathing.export(table_name: options[:table], id: options[:id].to_i)
  end
end

#tailObject



49
50
51
# File 'lib/breathing/cli.rb', line 49

def tail
  Breathing.tail_f(table_name: options[:table], id: options[:id].to_i)
end

#uninstallObject



17
18
19
# File 'lib/breathing/cli.rb', line 17

def uninstall
  Breathing.uninstall
end

#versionObject



55
56
57
# File 'lib/breathing/cli.rb', line 55

def version
  say "Version: #{Breathing::VERSION}"
end