lib/deepstream/record.rb in deepstream-0.2.3 vs lib/deepstream/record.rb in deepstream-0.2.4

- old
+ new

@@ -48,9 +48,14 @@ def update(version, data) @version = version.to_i @data = JSON.parse(data) end + def method_missing(name, *args) + return @data.fetch(name.to_s, nil) if args.empty? + raise(NoMethodError, name) + end + private def set_path(data, path, value) key, subkey = path.split('.', 2) if data.is_a?(Hash)