class Ezframe::Ht::List

配列を<UL><OL>要素に変換するためのクラス

Attributes

tag[RW]

Public Instance Methods

to_h(opts = {}) click to toggle source
# File lib/ezframe/ht.rb, line 123
def to_h(opts = {})
  return nil if self.empty?
  child = self.map { |elem| Ht.li(elem) }
  h = { tag: @tag, wrap: true, child: child }
  h.update(opts)
  return h
end