Class | Clio::Usage::Signature |
In: |
lib/clio/usage/signature.rb
|
Parent: | Object |
Used by the Usage::Parser as the end result of parsing a Usage::Command.
arguments | [R] | |
command | [R] | |
options | [R] | |
signature | [R] |
# File lib/clio/usage/signature.rb, line 11 def initialize(c, a, o) @signature = [c, a, o] @command = c @arguments = a @options = o end
# File lib/clio/usage/signature.rb, line 29 def inspect; "#<#{self.class}:" + @signature.inspect + ">"; end
# File lib/clio/usage/signature.rb, line 32 def method_missing(s, *a) s = s.to_s case s #when /[=]$/ # n = s.chomp('=') # usage.option(n).type(*a) # #parser.parse # res = parser.options[n.to_sym] #when /[!]$/ # n = s.chomp('!') # res = parser.parse when /[?]$/ options[s.chomp('?').to_sym] else options[s.to_sym] end end