Class: S3Ranger::CLI::BaseCmd
- Inherits:
-
CmdParse::Command
- Object
- CmdParse::Command
- S3Ranger::CLI::BaseCmd
show all
- Defined in:
- lib/s3ranger/cli.rb
Instance Method Summary
collapse
Instance Method Details
#has_options? ⇒ Boolean
43
44
45
|
# File 'lib/s3ranger/cli.rb', line 43
def has_options?
not options.instance_variables.empty?
end
|
#has_prefix? ⇒ Boolean
47
48
49
|
# File 'lib/s3ranger/cli.rb', line 47
def has_prefix?
@has_prefix
end
|
#usage ⇒ Object
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
# File 'lib/s3ranger/cli.rb', line 51
def usage
u = []
u << "Usage: #{File.basename commandparser.program_name} #{name} "
u << "[options] " if has_options?
u << "bucket" if has_args?
if has_prefix? == 'required'
u << ':prefix'
elsif has_prefix?
u << "[:prefix]"
end
u.join ''
end
|