lib/volt/server/html_parser/attribute_scope.rb
# Take the attributes and create any bindings
Take the attributes and create any bindings
Take the attributes and create any bindings
def add_multiple_attribute(tag_name, id, attribute_name, parts, content)
    case attribute_name
    when 'checked', 'value'
      if parts.size > 1
        if tag_name == 'textarea'
          raise "The content of text area's can not be bound to multiple bindings."
        else
          raise "Multiple bindings can not be passed to a #{attribute_name} binding."
        end
      end
    end
    reactive_template_path = add_reactive_template(content)
    save_binding(id, "lambda { |__p, __t, __c, __id| AttributeBinding.new(__p, __t, __c, __id, #{attribute_name.inspect}, Proc.new { ReactiveTemplate.new(__p, __c, #{reactive_template_path.inspect}) }) }")
  end
def add_multiple_attribute ( tag_name , id , attribute_name , parts , content ) case attribute_name when 'checked' , 'value' if parts . size > 1 if tag_name == 'textarea' raise "The content of text area's can not be bound to multiple bindings." else raise "Multiple bindings can not be passed to a #{attribute_name} binding." end end end reactive_template_path = add_reactive_template ( content ) save_binding ( id , "lambda { |__p, __t, __c, __id| AttributeBinding.new(__p, __t, __c, __id, #{attribute_name.inspect}, Proc.new { ReactiveTemplate.new(__p, __c, #{reactive_template_path.inspect}) }) }" ) end
Take the attributes and create any bindings
Take the attributes and create any bindings
# Multiple ReactiveValue's can not be passed to value or checked attributes.
tag_name
id
attribute_name
parts
content