Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

changed name of singleton method

  • Loading branch information...
commit a8dbbc1f401a684e7756c45648833b3aee79a9ab 1 parent 6e4a3ce
@scalabl3 authored
Showing with 3 additions and 2 deletions.
  1. +2 −1  lib/couchbase_settings.rb
  2. +1 −1  lib/couchbase_settings/version.rb
View
3  lib/couchbase_settings.rb
@@ -24,13 +24,14 @@ def create_cbsettings_class(yml_file)
klass_name = "CouchbaseSetting"
#klass_name = "#{klass_name}CouchbaseSetting" unless klass_name=="CouchbaseSetting"
klass = Object.const_set(klass_name,Class.new)
+
hash.each do |key,value|
#Rails.logger.debug "hash: key = #{key}, value = #{value}"
klass.define_singleton_method(key){ value }
end
# add a method to inspect the entire yml hash
- klass.define_singleton_method("inspect") { hash }
+ klass.define_singleton_method("to_hash") { hash }
klass.class_eval do
def self.method_missing(method_id,*args)
View
2  lib/couchbase_settings/version.rb
@@ -1,3 +1,3 @@
module CouchbaseSettings
- VERSION = "0.1.3"
+ VERSION = "0.1.4"
end

0 comments on commit a8dbbc1

Please sign in to comment.
Something went wrong with that request. Please try again.