class method
self.desc
Ruby on Rails 7.0.10
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 49
def desc(usage = nil, description = nil, options = {})
if usage
super
else
@desc ||= ERB.new(File.read(usage_path), trim_mode: "-").result(binding) if usage_path
end
end
Defined in railties/lib/rails/command/base.rb line 49
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Rails::Command::Base