Sha256: 7e2170a37b6075a926d8cd32f631a3fd6cb18d051af4a7f38cd94174d986ff92

Contents?: true

Size: 784 Bytes

Versions: 9

Compression:

Stored size: 784 Bytes

Contents

# Author::    Eric Crane  (mailto:eric.crane@mac.com)
# Copyright:: Copyright (c) 2019 Eric Crane.  All rights reserved.
#
# Save an object to a file or other persistance mechcanism.
#

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

      KEYWORD = 'save'.freeze
      KEYWORD_SHORT = '>'.freeze

      #
      # Run the verb.
      #
      def run
        # TODO:  Not currently using folders or keeping
        # track of where the object was loaded from.
        $engine.persist_man.save @tokens.second
      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

9 entries across 9 versions & 1 rubygems

Version Path
gloo-0.8.0 lib/gloo/verbs/save.rb
gloo-0.7.7 lib/gloo/verbs/save.rb
gloo-0.7.6 lib/gloo/verbs/save.rb
gloo-0.7.5 lib/gloo/verbs/save.rb
gloo-0.7.4 lib/gloo/verbs/save.rb
gloo-0.7.3 lib/gloo/verbs/save.rb
gloo-0.7.2 lib/gloo/verbs/save.rb
gloo-0.7.1 lib/gloo/verbs/save.rb
gloo-0.7.0 lib/gloo/verbs/save.rb