Sha256: b9ce5674384fefc6f95f4edec8e3d5adcbb50a8ae49d131948e2969544e6b481

Contents?: true

Size: 874 Bytes

Versions: 13

Compression:

Stored size: 874 Bytes

Contents

module AssLauncher
  module Enterprise
    # @api private
    # Mixin for {CliDef}
    # Load all CLI definitions from files +cli_def/v.v.v.rb+
    module CliDefsLoader
      DEFS_PATH = File.expand_path('../cli_def', __FILE__)
      def version_from_file_name(file)
        Gem::Version.new File.basename(file, '.rb')
      end
      private :version_from_file_name

      def defs_versions
        Dir.glob(File.join(DEFS_PATH, '*.rb')).map do |l|
          version_from_file_name l
        end.sort
      end
      private :defs_versions

      def load_def(v)
        require File.join(DEFS_PATH, "#{v}")
        @loaded_defs ||= []
        @loaded_defs << v
      end
      private :load_def

      def load_defs
        defs_versions.sort.each do |v|
          enterprise_version v
          load_def v
        end
      end
      private :load_defs
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
ass_launcher-0.7.0 lib/ass_launcher/enterprise/cli_defs_loader.rb
ass_launcher-0.6.0 lib/ass_launcher/enterprise/cli_defs_loader.rb
ass_launcher-0.5.0 lib/ass_launcher/enterprise/cli_defs_loader.rb
ass_launcher-0.4.1 lib/ass_launcher/enterprise/cli_defs_loader.rb
ass_launcher-0.4.0 lib/ass_launcher/enterprise/cli_defs_loader.rb
ass_launcher-0.3.4 lib/ass_launcher/enterprise/cli_defs_loader.rb
ass_launcher-0.3.3 lib/ass_launcher/enterprise/cli_defs_loader.rb
ass_launcher-0.3.2 lib/ass_launcher/enterprise/cli_defs_loader.rb
ass_launcher-0.3.1 lib/ass_launcher/enterprise/cli_defs_loader.rb
ass_launcher-0.3.0 lib/ass_launcher/enterprise/cli_defs_loader.rb
ass_launcher-0.2.2 lib/ass_launcher/enterprise/cli_defs_loader.rb
ass_launcher-0.2.1 lib/ass_launcher/enterprise/cli_defs_loader.rb
ass_launcher-0.2.0 lib/ass_launcher/enterprise/cli_defs_loader.rb