Class: Gzr::Commands::Space
- Inherits:
-
SubCommandBase
show all
- Defined in:
- lib/gzr/commands/space.rb,
lib/gzr/commands/space/ls.rb,
lib/gzr/commands/space/rm.rb,
lib/gzr/commands/space/cat.rb,
lib/gzr/commands/space/top.rb,
lib/gzr/commands/space/tree.rb,
lib/gzr/commands/space/create.rb,
lib/gzr/commands/space/export.rb
Defined Under Namespace
Classes: Cat, Create, Export, Ls, Rm, Top, Tree
Instance Method Summary
collapse
banner, subcommand_prefix
Instance Method Details
#cat(space_id) ⇒ Object
97
98
99
100
101
102
103
104
|
# File 'lib/gzr/commands/space.rb', line 97
def cat(space_id)
if options[:help]
invoke :help, ['cat']
else
require_relative 'space/cat'
Gzr::Commands::Space::Cat.new(space_id,options).execute
end
end
|
#create(name, parent_space) ⇒ Object
37
38
39
40
41
42
43
44
|
# File 'lib/gzr/commands/space.rb', line 37
def create(name, parent_space)
if options[:help]
invoke :help, ['create']
else
require_relative 'space/create'
Gzr::Commands::Space::Create.new(name, parent_space, options).execute
end
end
|
#export(starting_space) ⇒ Object
71
72
73
74
75
76
77
78
|
# File 'lib/gzr/commands/space.rb', line 71
def export(starting_space)
if options[:help]
invoke :help, ['export']
else
require_relative 'space/export'
Gzr::Commands::Space::Export.new(starting_space,options).execute
end
end
|
#ls(filter_spec = nil) ⇒ Object
115
116
117
118
119
120
121
122
|
# File 'lib/gzr/commands/space.rb', line 115
def ls(filter_spec=nil)
if options[:help]
invoke :help, ['ls']
else
require_relative 'space/ls'
Gzr::Commands::Space::Ls.new(filter_spec,options).execute
end
end
|
#rm(space_id) ⇒ Object
127
128
129
130
131
132
133
134
|
# File 'lib/gzr/commands/space.rb', line 127
def rm(space_id)
if options[:help]
invoke :help, ['rm']
else
require_relative 'space/rm'
Gzr::Commands::Space::Rm.new(space_id,options).execute
end
end
|
#top ⇒ Object
53
54
55
56
57
58
59
60
|
# File 'lib/gzr/commands/space.rb', line 53
def top(*)
if options[:help]
invoke :help, ['top']
else
require_relative 'space/top'
Gzr::Commands::Space::Top.new(options).execute
end
end
|
#tree(starting_space) ⇒ Object
83
84
85
86
87
88
89
90
|
# File 'lib/gzr/commands/space.rb', line 83
def tree(starting_space)
if options[:help]
invoke :help, ['tree']
else
require_relative 'space/tree'
Gzr::Commands::Space::Tree.new(starting_space,options).execute
end
end
|