Class: PackageCommand
Instance Attribute Summary
Attributes inherited from Command
#args
Instance Method Summary
collapse
Methods inherited from Command
all, #execute, inherited, #initialize, load, #name
Constructor Details
This class inherits a constructor from Command
Instance Method Details
#description ⇒ Object
178
179
180
|
# File 'lib/replicant/command.rb', line 178
def description
"set a default package to work with"
end
|
#run ⇒ Object
190
191
192
193
|
# File 'lib/replicant/command.rb', line 190
def run
output "Setting default package to #{args.inspect}"
@repl.default_package = args
end
|
#usage ⇒ Object
182
183
184
|
# File 'lib/replicant/command.rb', line 182
def usage
"#{name} com.mydomain.mypackage"
end
|
#valid_args? ⇒ Boolean
186
187
188
|
# File 'lib/replicant/command.rb', line 186
def valid_args?
args.present? && /^\w+(\.\w+)*$/ =~ args
end
|