lib/sinatra/tags.rb
##
# Normalize _attrs_, replacing boolean keys
# with their mirrored values.
# 
# @api private
Normalize _attrs_, replacing boolean keys
with their mirrored values.
Normalize _attrs_ replacing boolean keys with their mirrored values .
def normalize_html_attributes(attrs = {}) 
          return if attrs.blank?
          attrs.delete(:newline) 
          attrs.each do |name, value|
            if boolean_attribute?(name)
              value === true ? attrs[name] = name : attrs.delete(name)
            end
          end
          return attrs.empty? ? '' : ' ' + attrs.to_html_attributes
        end
def normalize_html_attributes ( attrs = { } ) return if attrs . blank? attrs . delete ( :newline ) attrs . each do | name , value | if boolean_attribute? ( name ) value === true ? attrs [ name ] = name : attrs . delete ( name ) end end return attrs . empty? ? '' : ' ' + attrs . to_html_attributes end
Normalize _attrs_, replacing boolean keys
with their mirrored values.
Normalize _attrs_ replacing boolean keys with their mirrored values .
# remove newline from attributes
attrs
<not_specific>
api
None