Sha256: 35c66d34aae7a94dff8d658a50c74476658de0230cd740cfe00dce7818ade1db

Contents?: true

Size: 632 Bytes

Versions: 7

Compression:

Stored size: 632 Bytes

Contents

module Brightbox
  module Config
    # This module holds a very simple set of change / dirty tracking methods to
    # keep track of when the config or any sub part (client config sections)
    # have been changed to prevent excess saving
    #
    module Dirty
      # @return [Boolean] +true+ if config has been modified since loading
      def dirty?
        !! @dirty
      end

      # Mark the config as being dirty
      #
      def dirty!
        @dirty = true
      end

      # Remove that the config is dirty because it has been saved to disk
      #
      def clean_up
        @dirty = false
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
brightbox-cli-1.2.2 lib/brightbox-cli/config/dirty.rb
brightbox-cli-1.2.1 lib/brightbox-cli/config/dirty.rb
brightbox-cli-1.2.0 lib/brightbox-cli/config/dirty.rb
brightbox-cli-1.1.0 lib/brightbox-cli/config/dirty.rb
brightbox-cli-1.0.0 lib/brightbox-cli/config/dirty.rb
brightbox-cli-1.0.0.rc2 lib/brightbox-cli/config/dirty.rb
brightbox-cli-1.0.0.rc1 lib/brightbox-cli/config/dirty.rb