Sha256: 554b4e717abec75ca6366dd685553f686b8fddd1d08439816fdeaa87bb5ea539

Contents?: true

Size: 796 Bytes

Versions: 1

Compression:

Stored size: 796 Bytes

Contents

module Pione
  module Command
    class FrontOwnerCommand < BasicCommand
      define_option("--my-ip-address=ADDRESS", "set my IP address") do |address|
        Global.my_ip_address = address
      end

      # Runs the command.
      def run
        parse_options
        validate_options
        setup_front
        prepare
        $PROGRAM_NAME = program_name
        start
      end

      # Setups font server.
      # @return [void]
      def setup_front
        Global.front = create_front
      end

      # Creates a front server. This method should be overridden in subclasses.
      # @return [BasicFront]
      #   front server
      def create_front
        raise NotImplementedError
      end

      def terminate
        super
        DRb.stop_service
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pione-0.1.0 lib/pione/command/front-owner-command.rb