Sha256: 434f15454278a379f78600e562d95bc824ef79fb890e04a36d02e447f2539085

Contents?: true

Size: 807 Bytes

Versions: 1

Compression:

Stored size: 807 Bytes

Contents

module ActiveMocker

  module Config
    extend self

    attr_accessor :schema_file,
                  :model_dir,
                  :active_hash_as_base,
                  :schema_attributes,
                  :model_relationships,
                  :model_methods,
                  :mass_assignment,
                  :schema_file_reader,
                  :model_file_reader

    def config
      default
      yield self
    end

    def default
      schema_file         = nil
      model_dir           = nil
      active_hash_as_base = false
      schema_attributes   = true
      model_relationships = true
      model_methods       = true
      mass_assignment     = true
      log_level           = Logger::WARN
    end

    def log_level=(level)
      Logger_.level = level
    end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
active_mocker-0.4.0 lib/active_mocker/config.rb