Class: Capistrano::TaskDefinition

Inherits:
Object
  • Object
show all
Defined in:
lib/capistrano/ext/params.rb

Instance Method Summary collapse

Instance Method Details

#brief_description(max_length = nil) ⇒ Object



31
32
33
34
35
36
37
38
39
40
41
# File 'lib/capistrano/ext/params.rb', line 31

def brief_description(max_length=nil)
    brief = original_brief_description(max_length)
    unless @options.nil? || @options[:required].nil? || @options[:required].empty?
        brief << " " * (max_length-brief.length) if max_length > brief.length
        brief << "requires " + @options[:required].join(",")
    end
    unless @options.nil? || @options[:optional].nil? || @options[:optional].empty?
        brief << " optional " + @options[:optional].join(",")
    end
    brief
end

#original_brief_descriptionObject



30
# File 'lib/capistrano/ext/params.rb', line 30

alias_method :original_brief_description, :brief_description