Sha256: b201a043d207796397daf157d15cbd442d94b1ed01e3df056422b5fd318030ca

Contents?: true

Size: 518 Bytes

Versions: 4

Compression:

Stored size: 518 Bytes

Contents

module Light
  module Services
    class Variables
      def initialize
        @storage = {}
      end

      def add(key, variable)
        @storage[key] = variable
      end

      def get(key)
        @storage[key]
      end

      def delete(key)
        @storage.delete(key)
      end

      def blank?
        @storage.empty?
      end

      def any?
        !blank?
      end

      def to_hash
        @storage
      end

      private

      # Getters/Setters
      attr_accessor :storage
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
light-services-0.4.0 lib/light/services/variables.rb
light-services-0.3.0 lib/light/services/variables.rb
light-services-0.2.0 lib/light/services/variables.rb
light-services-0.1.0 lib/light/services/variables.rb