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

Methods inherited from SubCommandBase

banner, subcommand_prefix

Instance Method Details

#cat(space_id) ⇒ Object



103
104
105
106
107
108
109
110
# File 'lib/gzr/commands/space.rb', line 103

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



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

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



121
122
123
124
125
126
127
128
# File 'lib/gzr/commands/space.rb', line 121

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



133
134
135
136
137
138
139
140
# File 'lib/gzr/commands/space.rb', line 133

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

#topObject



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

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



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

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