Sha256: f0495cdca2ca231593a4483d81d44133f1b21f94e3d490b9d330ccf91b483e49

Contents?: true

Size: 956 Bytes

Versions: 7

Compression:

Stored size: 956 Bytes

Contents

# Author::    Eric Crane  (mailto:eric.crane@mac.com)
# Copyright:: Copyright (c) 2022 Eric Crane.  All rights reserved.
#
# Unload all files.
#

module GlooLang
  module Verbs
    class Unload < GlooLang::Core::Verb

      KEYWORD = 'unload'.freeze
      KEYWORD_SHORT = 'u!'.freeze

      #
      # Run the verb.
      #
      def run
        return unless @engine.persist_man.maps
        
        objs = @engine.persist_man.maps.map { |fs| fs.obj }
        objs.each { |o| o.msg_unload }
      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

7 entries across 7 versions & 1 rubygems

Version Path
gloo-lang-1.4.3 lib/gloo_lang/verbs/unload.rb
gloo-lang-1.4.2 lib/gloo_lang/verbs/unload.rb
gloo-lang-1.4.1 lib/gloo_lang/verbs/unload.rb
gloo-lang-1.4.0 lib/gloo_lang/verbs/unload.rb
gloo-lang-1.3.2 lib/gloo_lang/verbs/unload.rb
gloo-lang-1.3.1 lib/gloo_lang/verbs/unload.rb
gloo-lang-1.3.0 lib/gloo_lang/verbs/unload.rb