Code Duplication    Length = 4-6 lines in 2 locations

client/hyalite/dom_property_operations.rb 2 locations

@@ 67-72 (lines=6) @@
64
            namespace = property_info[:attribute_namespace]
65
            if namespace
66
              node.attributes[attribute_name, {namespace: namespace}] = value.to_s
67
            elsif property_info[:has_boolean_value] ||
68
                 (property_info[:has_overloaded_boolean_value] && value == true)
69
              node.attributes[attribute_name] = ''
70
            else
71
              node.attributes[attribute_name] = value.to_s
72
            end
73
          else
74
            prop_name = property_info[:property_name]
75
            unless property_info[:has_side_effects] && `'' + node[#{prop_name}]` == value.to_s
@@ 15-18 (lines=4) @@
12
          return if should_ignore_value(property_info, value)
13
14
          attribute_name = property_info[:attribute_name]
15
          if property_info[:has_boolean_value] || property_info[:has_overloaded_boolean_value] && value == true
16
            element.attributes[attribute_name] = ""
17
            return
18
          end
19
20
          element.attributes[attribute_name]=Hyalite.escape_text_content_for_browser(value)
21
        elsif DOMProperty.is_custom_attribute(name)