Sha256: be3d98c348cf7ab89c636745367bb8964ea048c5e36282354473ec2fbe2fe813

Contents?: true

Size: 1.19 KB

Versions: 7

Compression:

Stored size: 1.19 KB

Contents

# Author::    Eric Crane  (mailto:eric.crane@mac.com)
# Copyright:: Copyright (c) 2020 Eric Crane.  All rights reserved.
#
# Clear the screen.
#

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

      KEYWORD = 'cls'.freeze
      KEYWORD_SHORT = 'cls'.freeze

      #
      # Run the verb.
      #
      def run
        $engine&.clear_screen
      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
          CLS VERB
            NAME: cls
            SHORTCUT: cls

          DESCRIPTION
            Clear the console screen.

          SYNTAX
            cls

          PARAMETERS
            None

          RESULT
            The screen is cleared and cursor set to the top.

          ERRORS
            None
        TEXT
      end

    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

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