Class: Gzr::Commands::Folder

Inherits:
SubCommandBase show all
Defined in:
lib/gzr/commands/folder.rb,
lib/gzr/commands/folder/ls.rb,
lib/gzr/commands/folder/rm.rb,
lib/gzr/commands/folder/cat.rb,
lib/gzr/commands/folder/top.rb,
lib/gzr/commands/folder/tree.rb,
lib/gzr/commands/folder/create.rb,
lib/gzr/commands/folder/export.rb

Defined Under Namespace

Classes: Cat, Create, Export, Ls, Rm, Top, Tree

Instance Method Summary collapse

Methods inherited from SubCommandBase

banner, subcommand_prefix

Instance Method Details

#cat(folder_id) ⇒ Object



105
106
107
108
109
110
111
112
# File 'lib/gzr/commands/folder.rb', line 105

def cat(folder_id)
  if options[:help]
    invoke :help, ['cat']
  else
    require_relative 'folder/cat'
    Gzr::Commands::Folder::Cat.new(folder_id,options).execute
  end
end

#create(name, parent_folder) ⇒ Object



37
38
39
40
41
42
43
44
# File 'lib/gzr/commands/folder.rb', line 37

def create(name, parent_folder)
  if options[:help]
    invoke :help, ['create']
  else
    require_relative 'folder/create'
    Gzr::Commands::Folder::Create.new(name, parent_folder, options).execute
  end
end

#export(starting_folder) ⇒ Object



79
80
81
82
83
84
85
86
# File 'lib/gzr/commands/folder.rb', line 79

def export(starting_folder)
  if options[:help]
    invoke :help, ['export']
  else
    require_relative 'folder/export'
    Gzr::Commands::Folder::Export.new(starting_folder,options).execute
  end
end

#ls(filter_spec = nil) ⇒ Object



123
124
125
126
127
128
129
130
# File 'lib/gzr/commands/folder.rb', line 123

def ls(filter_spec=nil)
  if options[:help]
    invoke :help, ['ls']
  else
    require_relative 'folder/ls'
    Gzr::Commands::Folder::Ls.new(filter_spec,options).execute
  end
end

#rm(folder_id) ⇒ Object



135
136
137
138
139
140
141
142
# File 'lib/gzr/commands/folder.rb', line 135

def rm(folder_id)
  if options[:help]
    invoke :help, ['rm']
  else
    require_relative 'folder/rm'
    Gzr::Commands::Folder::Rm.new(folder_id,options).execute
  end
end

#topObject



55
56
57
58
59
60
61
62
# File 'lib/gzr/commands/folder.rb', line 55

def top(*)
  if options[:help]
    invoke :help, ['top']
  else
    require_relative 'folder/top'
    Gzr::Commands::Folder::Top.new(options).execute
  end
end

#tree(starting_folder) ⇒ Object



91
92
93
94
95
96
97
98
# File 'lib/gzr/commands/folder.rb', line 91

def tree(starting_folder)
  if options[:help]
    invoke :help, ['tree']
  else
    require_relative 'folder/tree'
    Gzr::Commands::Folder::Tree.new(starting_folder,options).execute
  end
end