aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/lib/hbc/cli/base.rb
blob: 3301cad91cdd7c1ebda0d77f5e83adb5c9bd9704 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
module Hbc
  class CLI
    class Base
      def self.command_name
        @command_name ||= name.sub(/^.*:/, "").gsub(/(.)([A-Z])/, '\1_\2').downcase
      end

      def self.visible
        true
      end

      def self.cask_tokens_from(args)
        args.reject { |a| a.empty? || a.chars.first == "-" }
      end

      def self.help
        nil
      end

      def self.needs_init?
        false
      end
    end
  end
end