lib/esse/index_mapping.rb in esse-0.0.5 vs lib/esse/index_mapping.rb in esse-0.1.1
- old
+ new
@@ -10,17 +10,17 @@
@mappings = body
end
# This method will be overwrited when passing a block during the
# mapping defination
- def as_json
+ def to_h
return @mappings unless @mappings.empty?
from_template || @mappings
end
def body
- as_json
+ to_h
end
def empty?
body.empty?
end