<commit_before><commit_msg>Add example for something which currently seems to require raw.<commit_after>dir = File.expand_path(File.dirname(__FILE__))
$LOAD_PATH.unshift("#{dir}/../lib")
require 'erector'

class Tabs < Erector::Widget
  attr_accessor :animals, :plants, :bacteria_and_viruses

  def render
    tabs = []
    if (@animals)
      tabs << raw(Erector::Widget.new { a "Animals", :href => "/animals" })
    end
    
    if (@plants)
      tabs << raw(Erector::Widget.new { a "Plants", :href => "/plants" })
    end
    
    if (@bacteria_and_viruses)
      tabs << raw(Erector::Widget.new { a "Bacteria & Viruses", :href => "/bacteria_and_viruses" })
    end

    separator = raw(Erector::Widget.new { text nbsp(" |"); text " " })
    text(raw(tabs.join(separator)))
  end
end

tabs1 = Tabs.new
tabs1.animals = true; tabs1.bacteria_and_viruses = true;
puts tabs1.to_s

tabs2 = Tabs.new
tabs2.plants = true
puts tabs2.to_s

{'fraction_non_alphanumeric': 0.15112540192926044, 'fraction_numerical': 0.007502679528403001, 'mean_word_length': 3.646766169154229, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6389204', 'n_tokens_mistral': 356, 'n_tokens_neox': 327, 'n_words': 74}