lib/upperkut/util.rb in upperkut-0.1.2 vs lib/upperkut/util.rb in upperkut-0.1.3

- old
+ new

@@ -3,13 +3,13 @@ module Upperkut module Util def to_underscore(object) klass_name = object klass_name.gsub!(/::/, '_') - klass_name.gsub!(/([A-Z\d]+)([A-Z][a-z])/,'\1_\2') - klass_name.gsub!(/([a-z\d])([A-Z])/,'\1_\2') - klass_name.tr!("-", "_") + klass_name.gsub!(/([A-Z\d]+)([A-Z][a-z])/, '\1_\2') + klass_name.gsub!(/([a-z\d])([A-Z])/, '\1_\2') + klass_name.tr!('-', '_') klass_name.downcase! klass_name end def encode_json_items(items) @@ -20,9 +20,9 @@ ) end end def decode_json_items(items) - items.collect {|i| JSON.parse(i) } + items.collect { |i| JSON.parse(i) } end end end