Class | Clio::Usage::Argument |
In: |
lib/clio/usage/argument.rb
|
Parent: | Object |
TODO: Should argument have name in addition to type?
help | [R] | |
splat | [R] | |
type | [R] | attr :parent attr :name |
# File lib/clio/usage/argument.rb, line 25 def initialize_copy(o) #@name = o.name.dup @type = o.type.dup @help = o.help.dup end
# File lib/clio/usage/argument.rb, line 73 def inspect to_s #s = "<#{name}" #s << ":#{type.inspect}" if type #s << ">" #s end
# File lib/clio/usage/argument.rb, line 56 def splat(true_or_false=nil) return @splat if true_or_false.nil? @splat = true_or_false end
# File lib/clio/usage/argument.rb, line 67 def to_s s = "<#{type}" s << (splat ? "...>" : ">") s end