aboutsummaryrefslogtreecommitdiffstats
path: root/core/configloader.rb
diff options
context:
space:
mode:
Diffstat (limited to 'core/configloader.rb')
-rw-r--r--core/configloader.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/configloader.rb b/core/configloader.rb
index f0d4197e..0dd98021 100644
--- a/core/configloader.rb
+++ b/core/configloader.rb
@@ -81,6 +81,16 @@ module ConfigLoader
end
+ # キーに対応する値が存在するかを調べる。
+ # 値が設定されていれば、それが _nil_ や _false_ であっても _true_ を返す
+ # ==== Args
+ # [key] Symbol キー
+ # ==== Return
+ # [true] 存在する
+ # [false] 存在しない
+ def include?(key)
+ @@configloader_cache.has_key? configloader_key(key) end
+
# _key_ に対応するオブジェクトを取り出す。
# _key_ が存在しない場合は nil か _ifnone_ を返す
def at(key, ifnone=nil)