Sha256: ad0297491cde81b62378862aabc6aab03aa90660c45bc5a548c3905a742f1f78

Contents?: true

Size: 1.04 KB

Versions: 1

Compression:

Stored size: 1.04 KB

Contents

module ActiveMocker
  class << self
    # Override default Configurations
    #
    #  ActiveMocker.configure do |c|
    #    c.model_dir=          # Directory of ActiveRecord models
    #    c.mock_dir=           # Directory to save mocks
    #    c.single_model_path=  # Path to generate a single mock
    #    c.progress_bar=       # False disables progress bar from sending to STDOUT
    #                            or pass a class that takes a count in the initializer and responds to #increment.
    #    c.error_verbosity=    # 0 = none, 1 = One line per error, 2 = More details
    #    c.disable_modules_and_constants= # Modules are include/extend along with constant declarations.
    #                                     # Default is false, to disable set to true.
    #  end
    #
    # @param [block]
    # @returns self
    def configure(&block)
      Config.set(&block)
      self
    end
    alias_method :config, :configure

    # Generates Mocks file
    # @returns self
    def create_mocks
      Generate.new.call
      self
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
active_mocker-2.0.0.beta1 lib/active_mocker/public_methods.rb