Module: EasyTable::Components::Spans

Included in:
Span, TableBuilder
Defined in:
lib/easy_table/components/spans.rb

Instance Method Summary collapse

Instance Method Details

#span(*args, &block) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/easy_table/components/spans.rb', line 4

def span(*args, &block)
  opts = options_from_hash(args)
  title, label = *args
  child = node << Tree::TreeNode.new(title || generate_node_name)
  span = Span.new(child, title, label, opts, @template, block)
  child.content = span
end