lib/liner/serializable.rb in liner-0.2.0 vs lib/liner/serializable.rb in liner-0.2.1
- old
+ new
@@ -1,11 +1,17 @@
module Liner
module Serializable
- def as_json(*)
- to_h
- end
-
+ # Convert a liner instances attributes to json
+ # @return [String] A JSON string of attributes
+ # @api public
def to_json(*args)
as_json.to_json(*args)
+ end
+
+ private
+
+ # @api private
+ def as_json(*)
+ to_h
end
end
end