Class: Gzr::Commands::Model

Inherits:
SubCommandBase show all
Defined in:
lib/gzr/commands/model.rb,
lib/gzr/commands/model/ls.rb,
lib/gzr/commands/model/cat.rb,
lib/gzr/commands/model/set.rb,
lib/gzr/commands/model/import.rb,
lib/gzr/commands/model/set/ls.rb,
lib/gzr/commands/model/set/rm.rb,
lib/gzr/commands/model/set/cat.rb,
lib/gzr/commands/model/set/import.rb

Defined Under Namespace

Classes: Cat, Import, Ls, Set

Instance Method Summary collapse

Methods inherited from SubCommandBase

banner, subcommand_prefix

Instance Method Details

#cat(model_id) ⇒ Object



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

def cat(model_id)
  if options[:help]
    invoke :help, ['cat']
  else
    require_relative 'model/cat'
    Gzr::Commands::Model::Cat.new(model_id,options).execute
  end
end

#import(model_file) ⇒ Object



74
75
76
77
78
79
80
81
# File 'lib/gzr/commands/model.rb', line 74

def import(model_file)
  if options[:help]
    invoke :help, ['import']
  else
    require_relative 'model/import'
    Gzr::Commands::Model::Import.new(model_file,options).execute
  end
end

#lsObject



44
45
46
47
48
49
50
51
# File 'lib/gzr/commands/model.rb', line 44

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