couchbase-settings 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/couchbase_settings/version.rb +1 -1
- data/lib/couchbase_settings.rb +2 -1
- metadata +1 -1
data/lib/couchbase_settings.rb
CHANGED
@@ -24,13 +24,14 @@ module CouchbaseSettings
|
|
24
24
|
klass_name = "CouchbaseSetting"
|
25
25
|
#klass_name = "#{klass_name}CouchbaseSetting" unless klass_name=="CouchbaseSetting"
|
26
26
|
klass = Object.const_set(klass_name,Class.new)
|
27
|
+
|
27
28
|
hash.each do |key,value|
|
28
29
|
#Rails.logger.debug "hash: key = #{key}, value = #{value}"
|
29
30
|
klass.define_singleton_method(key){ value }
|
30
31
|
end
|
31
32
|
|
32
33
|
# add a method to inspect the entire yml hash
|
33
|
-
klass.define_singleton_method("
|
34
|
+
klass.define_singleton_method("to_hash") { hash }
|
34
35
|
|
35
36
|
klass.class_eval do
|
36
37
|
def self.method_missing(method_id,*args)
|