source/joosy/resources/hash.coffee in joosy-1.2.0.alpha.71 vs source/joosy/resources/hash.coffee in joosy-1.2.0.alpha.73

- old
+ new

@@ -1,10 +1,14 @@ +#= require joosy/modules/resources/cacher + class Joosy.Resources.Hash extends Joosy.Function @include Joosy.Modules.Events @include Joosy.Modules.Filters + @registerPlainFilters 'beforeLoad' + constructor: (data={}) -> return super -> @__fillData data, false get: (path) -> @@ -30,14 +34,17 @@ load: (data) -> @__fillData data @ + clone: (callback) -> + new @constructor Object.clone(@data, true) + __call: (path, value) -> if arguments.length > 1 - @__set path, value + @set path, value else - @__get path + @get path # # Locates the actual instance of attribute path `foo.bar` from get/set # # @param [String] path Path to the attribute (`foo.bar`) \ No newline at end of file