You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: button_to_helper.rb
    path of file: ./repos/bh/lib/bh/helpers
    
    the code of the file until where you have to start completion: require 'bh/classes/button_to'
require 'bh/classes/navbar'
require 'bh/classes/stack'

module Bh
  module Helpers
    # Overrides `button_to` to display a Bootstrap-styled button.
    # 
    
    def button_to(*args, &block)
      button_to = Bh::ButtonTo.new self, *args, &block

      if button_to.extract! :context, :size, :layout
        button_to.append_button_class! :btn
        button_to.append_button_class! button_to.context_class
        button_to.append_button_class! button_to.size_class
        button_to.append_button_class! button_to.layout_class
        button_to.append_form_class! 'navbar-form' if Bh::Stack.find(Bh::Navbar)
      end