Sha256: aa15a071a26dad024ed8b5ddcf24025f337f84d0098f122235c480ac13c907c9

Contents?: true

Size: 914 Bytes

Versions: 14

Compression:

Stored size: 914 Bytes

Contents

# Author::    Eric Crane  (mailto:eric.crane@mac.com)
# Copyright:: Copyright (c) 2024 Eric Crane.  All rights reserved.
#
# Break out of the script without error.
#

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

      KEYWORD = 'break'.freeze
      KEYWORD_SHORT = 'stop'.freeze

      #
      # Run the verb.
      # Stop the execution of the current script.
      #
      def run
        @engine.exec_env.running_script.break_out
      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

      # ---------------------------------------------------------------------
      #    Private functions
      # ---------------------------------------------------------------------

      private

    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
gloo-3.10.1 lib/gloo/verbs/break.rb
gloo-3.10.0 lib/gloo/verbs/break.rb
gloo-3.9.1 lib/gloo/verbs/break.rb
gloo-3.9.0 lib/gloo/verbs/break.rb
gloo-3.8.0 lib/gloo/verbs/break.rb
gloo-3.7.0 lib/gloo/verbs/break.rb
gloo-3.6.2 lib/gloo/verbs/break.rb
gloo-3.6.1 lib/gloo/verbs/break.rb
gloo-3.6.0 lib/gloo/verbs/break.rb
gloo-3.5.0 lib/gloo/verbs/break.rb
gloo-3.4.1 lib/gloo/verbs/break.rb
gloo-3.4.0 lib/gloo/verbs/break.rb
gloo-3.3.0 lib/gloo/verbs/break.rb
gloo-3.2.0 lib/gloo/verbs/break.rb