Sha256: 8542c6909fb7072afaff208cb6f865f5e39457317cb6f6a103adeec85d62d9a7

Contents?: true

Size: 768 Bytes

Versions: 1

Compression:

Stored size: 768 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'
      KEYWORD_SHORT = 'q'

      # 
      # 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

1 entries across 1 versions & 1 rubygems

Version Path
gloo-0.3.0 lib/gloo/verbs/quit.rb