File: parsing.rb

package info (click to toggle)
ruby-clamp 1.1.1-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, trixie
  • size: 312 kB
  • sloc: ruby: 2,359; makefile: 4
file content (24 lines) | stat: -rw-r--r-- 374 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
require "clamp/subcommand/execution"

module Clamp
  module Subcommand

    module Parsing

      protected

      def parse_subcommand
        return false unless self.class.has_subcommands?
        extend(Subcommand::Execution)
      end

      private

      def default_subcommand_name
        self.class.default_subcommand || request_help
      end

    end

  end
end