Class: HTML::List

Inherits:
Object
  • Object
show all
Defined in:
lib/html/list.rb

Instance Method Summary collapse

Constructor Details

#initialize(tag, enum) ⇒ List

Returns a new instance of List.



6
7
8
9
# File 'lib/html/list.rb', line 6

def initialize(tag, enum)
  @tag = tag
  @enum = enum
end

Instance Method Details

#to_htmlObject



11
12
13
# File 'lib/html/list.rb', line 11

def to_html
  @enum.map { |item| Tag.new(@tag, item).to_html }.join
end