lib/wp/api/resource.rb in wp-api-0.0.3 vs lib/wp/api/resource.rb in wp-api-0.0.4
- old
+ new
@@ -1,7 +1,6 @@
require 'active_support/inflector'
-require 'pry'
module WP::API
class Resource
attr_reader :attributes, :headers
@@ -46,9 +45,13 @@
resource = WP::API.const_get(klass)
resource.new(value)
else
value
end
+ end
+
+ def _remove_entities(string)
+ HTMLEntities.new.decode(string.gsub('&','&'))
end
def _downcase_keys(hash)
Hash.new.tap do |new_hash|
hash.each do |k, v|