Sha256: fbf57fd7287d75fc0642d489c9fdb1dbb908c9e9d14a564db8f344c651ac869d

Contents?: true

Size: 1.29 KB

Versions: 8

Compression:

Stored size: 1.29 KB

Contents

# Author::    Eric Crane  (mailto:eric.crane@mac.com)
# Copyright:: Copyright (c) 2020 Eric Crane.  All rights reserved.
#
# Play a standard system beep sound.
#

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

      KEYWORD = 'beep'.freeze
      KEYWORD_SHORT = 'b'.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
        print 7.chr
      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

      # ---------------------------------------------------------------------
      #    Help
      # ---------------------------------------------------------------------

      #
      # Get help for this verb.
      #
      def self.help
        return <<~TEXT
          BEEP VERB
            NAME: beep
            SHORTCUT: b

          DESCRIPTION
            Play a standard system beep sound.

          SYNTAX
            beep

          PARAMETERS
            None

          RESULT
            None

          ERRORS
            None
        TEXT
      end

    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
gloo-0.6.1 lib/gloo/verbs/beep.rb
gloo-0.6.0 lib/gloo/verbs/beep.rb
gloo-0.5.4 lib/gloo/verbs/beep.rb
gloo-0.5.3 lib/gloo/verbs/beep.rb
gloo-0.5.2 lib/gloo/verbs/beep.rb
gloo-0.5.1 lib/gloo/verbs/beep.rb
gloo-0.5.0 lib/gloo/verbs/beep.rb
gloo-0.4.0 lib/gloo/verbs/beep.rb