Sha256: 79a9db568cbf963930d73b2510c5c21cce5c73408f5a079222c118a8c1880346

Contents?: true

Size: 710 Bytes

Versions: 1

Compression:

Stored size: 710 Bytes

Contents

module Zeus
  module Plan

    class Acceptor < Node

      attr_reader :name, :aliases, :description, :action
      def initialize(name, aliases, description, &b)
        super(name)
        @description = description
        @aliases = aliases
        @action = b
      end

      # ^ configuration
      # V later use

      def commands
        [name, *aliases].map(&:to_s)
      end

      def acceptors
        self
      end

      def to_process_object(server)
        Zeus::Server::Acceptor.new(server).tap do |stage|
          stage.name = @name
          stage.aliases = @aliases
          stage.action = @action
          stage.description = @description
        end
      end

    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
zeus-0.4.6 lib/zeus/plan/acceptor.rb