lib/gli/app_support.rb in gli-2.0.0.rc5 vs lib/gli/app_support.rb in gli-2.0.0.rc6
- old
+ new
@@ -30,10 +30,15 @@
# Get the version string
def version_string #:nodoc
@version
end
+ # Get the default command for the entire app
+ def get_default_command
+ @default_command
+ end
+
# Runs whatever command is needed based on the arguments.
#
# +args+:: the command line ARGV array
#
# Returns a number that would be a reasonable exit code
@@ -111,10 +116,10 @@
def switches # :nodoc:
@switches ||= {}
end
def commands # :nodoc:
- @commands ||= {:help => GLI::Commands::Help.new(self)}
+ @commands ||= { :help => GLI::Commands::Help.new(self), :_doc => GLI::Commands::Doc.new(self) }
end
def pre_block
@pre_block ||= Proc.new do
true