<commit_before>module BootstrapLeatherHelper

  def add_title(title)
    @title = title
  end

  def add_subtitle(subtitle)
    @subtitle = subtitle
  end

  def add_description(description)
    @description = description
  end

  def add_keywords(keywords)
    @keywords = keywords
  end

  def add_head_css(&block)
    content_for :head_css, &block
  end

  def add_footer_javascript(&block)
    content_for :footer_javascript, &block
  end

  def render_keywords
    tag :meta, :name => :keywords, :content => @keywords || BootstrapLeather.configuration.application_keywords
  end

  def render_description
    tag :meta, :name => :description, :content => @description || BootstrapLeather.configuration.application_keywords
  end

  def render_title
    page_title = []
    page_title << @title
    page_title << @subtitle
    page_title << BootstrapLeather.configuration.application_title
    page_title << @keywords
    content_tag :title, page_title.compact.join(': ')
  end

  def render_h1(html_options = {})
    content_tag :h1, @title, html_options
  end

  def render_page_header(html_options = {})
    render(:partial => 'bootstrap_leather/page_header', :locals => {:title => @title, :subtitle => @subtitle, :html_options => html_options})
  end

  def responsive_meta_tag
    tag :meta, :name => :viewport, :content => 'width=device-width, initial-scale=1.0'
  end

  def flash_class(level)
    case level<commit_msg>Updated to use content_for for as many variables as possible, for ease of testing in applications<commit_after>module BootstrapLeatherHelper

  def add_title(title)
    content_for :title, title
  end

  def add_subtitle(subtitle)
    content_for :subtitle, subtitle
  end

  def add_description(description)
    content_for :description, description
  end

  def add_keywords(keywords)
    content_for :keywords, keywords
  end

  def add_head_css(&block)
    content_for :head_css, &block
  end

  def add_footer_javascript(&block)
    content_for :footer_javascript, &block
  end

  def render_keywords
    tag :meta, :name => :keywords, :content => content_for(:keywords) || BootstrapLeather.configuration.application_keywords
  end

  def render_description
    tag :meta, :name => :description, :content => content_for(:description) || BootstrapLeather.configuration.application_keywords
  end

  def render_title
    page_title = []
    page_title << content_for(:title)
    page_title << content_for(:subtitle)
    page_title << BootstrapLeather.configuration.application_title
    page_title << content_for(:keywords)
    content_tag :title, page_title.compact.join(': ')
  end

  def render_h1(html_options = {})
    content_tag :h1, content_for(:title), html_options
  end

  def render_page_header(html_options = {})
    render(:partial => 'bootstrap_leather/page_header', :locals => {:title => content_for(:title), :subtitle => content_for(:subtitle), :html_options => html_options})
  end

  def responsive_meta_tag
    tag :meta, :name => :viewport, :content => 'width=device-width, initial-scale=1.0'
  end

  def flash_class(level)
    case level
{'fraction_non_alphanumeric': 0.10051712992889464, 'fraction_numerical': 0.002585649644473174, 'mean_word_length': 4.448943661971831, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 25, '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': '4540242', 'n_tokens_mistral': 984, 'n_tokens_neox': 929, 'n_words': 222}