Sha256: f2cdde9d74c171285433131ad74734e78bf8119217d19d6fac655cd77f349ee0

Contents?: true

Size: 444 Bytes

Versions: 2

Compression:

Stored size: 444 Bytes

Contents

module Pacto
  class << self
    def generate!
      modes << :generate
    end

    def stop_generating!
      modes.delete :generate
    end

    def generating?
      modes.include? :generate
    end

    def validate!
      modes << :validate
    end

    def stop_validating!
      modes.delete :validate
    end

    def validating?
      modes.include? :validate
    end

    private

    def modes
      @modes ||= []
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pacto-0.3.1 lib/pacto/core/modes.rb
pacto-0.3.0 lib/pacto/core/modes.rb