25e88c63 by Michael Richards

Parse binding declarations for dependencies. Pass the dependency array (if any) …

…to the Rivets.Binding instance.
1 parent cee01a2a
...@@ -104,12 +104,16 @@ class Rivets.View ...@@ -104,12 +104,16 @@ class Rivets.View
104 104
105 type = attribute.name.replace bindingRegExp, '' 105 type = attribute.name.replace bindingRegExp, ''
106 pipes = (pipe.trim() for pipe in attribute.value.split '|') 106 pipes = (pipe.trim() for pipe in attribute.value.split '|')
107 path = pipes.shift().split(/(\.|:)/) 107 context = (ctx.trim() for ctx in pipes.shift().split '>')
108 path = context.shift().split /(\.|:)/
108 options.formatters = pipes 109 options.formatters = pipes
109 model = @models[path.shift()] 110 model = @models[path.shift()]
110 options.bypass = path.shift() is ':' 111 options.bypass = path.shift() is ':'
111 keypath = path.join() 112 keypath = path.join()
112 113
114 if dependencies = context.shift()
115 options.dependencies = dependencies.split /\s+/
116
113 if eventRegExp.test type 117 if eventRegExp.test type
114 type = type.replace eventRegExp, '' 118 type = type.replace eventRegExp, ''
115 options.special = "event" 119 options.special = "event"
......