class method
self.desc
Ruby on Rails 5.2.8.1
Since v5.2.8.1Signature
self.desc(usage = nil, description = nil, options = {})
Tries to get the description from a USAGE file one folder above the command root.
Parameters
-
usageopt = nil -
descriptionopt = nil -
optionsopt = {}
Source
# File railties/lib/rails/command/base.rb, line 31
def desc(usage = nil, description = nil, options = {})
if usage
super
else
@desc ||= ERB.new(File.read(usage_path)).result(binding) if usage_path
end
end
Defined in railties/lib/rails/command/base.rb line 31
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Rails::Command::Base