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: duration.rb
    path of file: ./repos/ruby/tool/lrama/lib/lrama/report
    
    the code of the file until where you have to start completion: module Lrama
  class Report
    module Duration
      def self.enable
        @_report_duration_enabled = true
      end


    
      def report_duration(method_name)
        time1 = Time.now.to_f
        result = yield
        time2 = Time.now.to_f

        if Duration.enabled?
          puts sprintf("%s %10.5f s", method_name, time2 - time1)
        end