lib/timber/contexts/custom.rb in timber-2.1.0.rc5 vs lib/timber/contexts/custom.rb in timber-2.1.0.rc6

- old
+ new

@@ -26,10 +26,10 @@ def initialize(attributes) @type = attributes[:type] || raise(ArgumentError.new(":type is required")) @data = attributes[:data] || raise(ArgumentError.new(":data is required")) end - # Builds a hash representation of containing simply objects, suitable for serialization. + # Builds a hash representation containing simple objects, suitable for serialization (JSON). def as_json(options = {}) {Timber::Util::Object.try(type, :to_sym) => data} end end end \ No newline at end of file