Sha256: 0b017fa4a6e9ba4e904ca268de778c9070bc91930cd53f564ce8652c7b8443c6

Contents?: true

Size: 703 Bytes

Versions: 6

Compression:

Stored size: 703 Bytes

Contents

# encoding: utf-8

# 基本設定を記述する
module Flextures
  module Config
    @@read_onlys=[]
    @@configs={
      fixture_load_directory: "spec/fixtures/",
      fixture_dump_directory: "spec/fixtures/",
      init_all_tables: false,  # 実行後に全テーブルの初期化を行うか?falseにするとそのぶん高速化できる
    }
    # ハッシュをsetter、getterに変換
    class<< self
      @@configs.each do |setting_key, setting_value|
        define_method(setting_key){ @@configs[setting_key] }
        define_method("#{setting_key}="){ |arg| @@configs[setting_key]=arg } unless @@read_onlys.include?(setting_key)
      end
    end
  end
end


Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
flextures-1.9.11 lib/flextures/flextures_base_config.rb
flextures-1.9.10 lib/flextures/flextures_base_config.rb
flextures-1.9.9 lib/flextures/flextures_base_config.rb
flextures-1.9.8 lib/flextures/flextures_base_config.rb
flextures-1.9.7 lib/flextures/flextures_base_config.rb
flextures-1.9.6 lib/flextures/flextures_base_config.rb