Sha256: 4b29198742e977ab0f14e4ea90398c4883e356cde9b5306b5f7c5c3e36a700ec

Contents?: true

Size: 887 Bytes

Versions: 9

Compression:

Stored size: 887 Bytes

Contents

require 'ultra_command_line/manager/factory'
require 'ultra_command_line/manager/layered_definition'
require 'ultra_command_line/manager/cmd_line_args'
require 'ultra_command_line/manager/commands'
require 'ultra_command_line/manager/processors'

module UltraCommandLine
  module Manager

    class Base

      include UltraCommandLine::Utils::ErrorPropagation

      extend UltraCommandLine::Manager::Factory

      include UltraCommandLine::Manager::LayeredDefinition
      include UltraCommandLine::Manager::Commands

      include UltraCommandLine::Manager::Processors

      def initialize(commands = [])
        @commands = commands
      end

      def definition_hash_to_commands
        self.class.from_hash(definition_hash) do |commands|
          commands.each {|command| command.send :manager=, self }
          @commands = commands
        end
      end

    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ultra_command_line-0.4.16 lib/ultra_command_line/manager/base.rb
ultra_command_line-0.4.15 lib/ultra_command_line/manager/base.rb
ultra_command_line-0.4.14 lib/ultra_command_line/manager/base.rb
ultra_command_line-0.4.13 lib/ultra_command_line/manager/base.rb
ultra_command_line-0.4.12 lib/ultra_command_line/manager/base.rb
ultra_command_line-0.4.10 lib/ultra_command_line/manager/base.rb
ultra_command_line-0.4.9 lib/ultra_command_line/manager/base.rb
ultra_command_line-0.4.8 lib/ultra_command_line/manager/base.rb
ultra_command_line-0.4.7 lib/ultra_command_line/manager/base.rb