lib/rubyoshka/renderer.rb
# Emits tag attributes into the rendering buffer
# @param props [Hash] tag attributes
# @return [void]
Emits tag attributes into the rendering buffer
Emits tag attributes into the rendering buffer
def emit_props(props)
      props.each { |k, v|
        case k
        when :src, :href
          @buffer << S_SPACE << k.to_s << S_EQUAL_QUOTE <<
            EscapeUtils.escape_uri(v) << S_QUOTE
        else
          case v
          when true
            @buffer << S_SPACE << k.to_s
          when false, nil
          else
            @buffer << S_SPACE << k.to_s << S_EQUAL_QUOTE << v << S_QUOTE
          end
        end
      }
    end
def emit_props ( props ) props . each { | k , v | case k when :src , :href @buffer << S_SPACE << k . to_s << S_EQUAL_QUOTE << EscapeUtils . escape_uri ( v ) << S_QUOTE else case v when true @buffer << S_SPACE << k . to_s when false , nil else @buffer << S_SPACE << k . to_s << S_EQUAL_QUOTE << v << S_QUOTE end end } end
Emits tag attributes into the rendering buffer
Emits tag attributes into the rendering buffer
# emit nothing
None
void
props
None