lib/iron/web/html.rb
def render(depth = 0, inblock = true)
    # Convert elements to strings
    @items.collect do |item|
      if item.is_a?(String)
        if inblock
          inblock = false
          '  '*depth + item
        else
          item
        end
      elsif item.nil?
        ''
      else
        item.render(depth,inblock)
      end
    end.join('')
  end
# Renders out as html - accepts depth param to indicate level of indentation
Renders out as html - accepts depth param to indicate level of indentation
Renders out as html - accepts depth param to indicate level of indentation
def render(depth = 0, inblock = true)
    @items.collect do |item|
      if item.is_a?(String)
        if inblock
          inblock = false
          '  '*depth + item
        else
          item
        end
      elsif item.nil?
        ''
      else
        item.render(depth,inblock)
      end
    end.join('')
  end
def render ( depth = 0 , inblock = true ) @items . collect do | item | if item . is_a? ( String ) if inblock inblock = false '  ' * depth + item else item end elsif item . nil? '' else item . render ( depth , inblock ) end end . join ( '' ) end
Renders out as html - accepts depth param to indicate level of indentation
Renders out as html - accepts depth param to indicate level of indentation
# Convert elements to strings
depth
inblock