Sha256: 162134b2d5313d06542fd28937ada55433ccb384bea3a94233719ea99e4f99e1

Contents?: true

Size: 757 Bytes

Versions: 9

Compression:

Stored size: 757 Bytes

Contents

# Author::    Eric Crane  (mailto:eric.crane@mac.com)
# Copyright:: Copyright (c) 2019 Eric Crane.  All rights reserved.
#
# Quit the running gloo engine.
#

module Gloo
  module Verbs
    class Quit < Gloo::Core::Verb

      KEYWORD = 'quit'.freeze
      KEYWORD_SHORT = 'q'.freeze

      #
      # Run the verb.
      #
      # We'll mark the application as not running and let the
      # engine stop gracefully next time through the loop.
      #
      def run
        $engine.stop_running
      end

      #
      # Get the Verb's keyword.
      #
      def self.keyword
        return KEYWORD
      end

      #
      # Get the Verb's keyword shortcut.
      #
      def self.keyword_shortcut
        return KEYWORD_SHORT
      end

    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
gloo-0.8.0 lib/gloo/verbs/quit.rb
gloo-0.7.7 lib/gloo/verbs/quit.rb
gloo-0.7.6 lib/gloo/verbs/quit.rb
gloo-0.7.5 lib/gloo/verbs/quit.rb
gloo-0.7.4 lib/gloo/verbs/quit.rb
gloo-0.7.3 lib/gloo/verbs/quit.rb
gloo-0.7.2 lib/gloo/verbs/quit.rb
gloo-0.7.1 lib/gloo/verbs/quit.rb
gloo-0.7.0 lib/gloo/verbs/quit.rb