Class: Gzr::Commands::Connection

Inherits:
SubCommandBase show all
Defined in:
lib/gzr/commands/connection.rb,
lib/gzr/commands/connection/ls.rb,
lib/gzr/commands/connection/rm.rb,
lib/gzr/commands/connection/cat.rb,
lib/gzr/commands/connection/test.rb,
lib/gzr/commands/connection/import.rb,
lib/gzr/commands/connection/dialects.rb

Defined Under Namespace

Classes: Cat, Dialects, Import, Ls, Rm, Test

Instance Method Summary collapse

Methods inherited from SubCommandBase

banner, subcommand_prefix

Instance Method Details

#cat(connection_name) ⇒ Object



77
78
79
80
81
82
83
84
# File 'lib/gzr/commands/connection.rb', line 77

def cat(connection_name)
  if options[:help]
    invoke :help, ['cat']
  else
    require_relative 'connection/cat'
    Gzr::Commands::Connection::Cat.new(connection_name, options).execute
  end
end

#dialectsObject



41
42
43
44
45
46
47
48
# File 'lib/gzr/commands/connection.rb', line 41

def dialects(*)
  if options[:help]
    invoke :help, ['dialects']
  else
    require_relative 'connection/dialects'
    Gzr::Commands::Connection::Dialects.new(options).execute
  end
end

#import(file) ⇒ Object



107
108
109
110
111
112
113
114
# File 'lib/gzr/commands/connection.rb', line 107

def import(file)
  if options[:help]
    invoke :help, ['import']
  else
    require_relative 'connection/import'
    Gzr::Commands::Connection::Import.new(file, options).execute
  end
end

#lsObject



59
60
61
62
63
64
65
66
# File 'lib/gzr/commands/connection.rb', line 59

def ls(*)
  if options[:help]
    invoke :help, ['ls']
  else
    require_relative 'connection/ls'
    Gzr::Commands::Connection::Ls.new(options).execute
  end
end

#rm(connection_name) ⇒ Object



89
90
91
92
93
94
95
96
# File 'lib/gzr/commands/connection.rb', line 89

def rm(connection_name)
  if options[:help]
    invoke :help, ['rm']
  else
    require_relative 'connection/rm'
    Gzr::Commands::Connection::Rm.new(connection_name, options).execute
  end
end

#test(connection_name) ⇒ Object



125
126
127
128
129
130
131
132
# File 'lib/gzr/commands/connection.rb', line 125

def test(connection_name)
  if options[:help]
    invoke :help, ['test']
  else
    require_relative 'connection/test'
    Gzr::Commands::Connection::Test.new(connection_name,options).execute
  end
end