Shorthand to get the associated Grammar::Command object from a Program or a Grammar::Command object
258 259 260 261
# File 'lib/shellopts/grammar.rb', line 258 def self.command(obj) constrain obj, Command, ::ShellOpts::Program obj.is_a?(Command) ? obj : obj.__grammar__ end