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: simple_accordion.rb
    path of file: ./repos/shoes4/samples
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Accordion
  OPEN_HEIGHT = 240

  def open_page(stack)
    if stack.height >= OPEN_HEIGHT
      zero_other_pages(stack)
      return
    end

    a = animate 60 do
      stack.height += 20
      decrement_other_pages(stack)
      a.stop 
    
  def page(title, active, text)
    @pages ||= []
    stack do
      page_text = nil
      header = stack width: "100%" do
        background "#fff".."#eed"
        hi = background "#ddd".."#ba9", hidden: true
        para link(title) {}, size: 26
        hover { hi.show }
        leave { hi.hide }
      end

      height = active ? OPEN_HEIGHT : 0
      page_text = stack width: "100%", height: height do
        para text
      end
      @pages << page_text

      header.click do
        open_page(page_text)
      end
    end
  end