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/facets/work/consider/standard
    
    the code of the file until where you have to start completion: #
# @author Matthew Harris
#
class Duration
  include Comparable

  SECOND =   1
  MINUTE =
    
  def segments; @segments; end

  #
  def reset_segments(*segments)
    case segments.size
    when 0
      @segments = [:days, :hours, :minutes, :seconds]
    when 1
      case segments = segments[0]
      when Array
        @segments = segments.collect{ |p| (p.to_s.downcase.chomp('s') + 's').to_sym }
        raise ArgumentError unless @segments.all?{ |s| SEGMENTS.include?(s) }
      else
        f = SEGMENTS.index(segments)
        @segments = SEGMENTS[f..0]
      end
    when 2
      f = SEGMENTS.index(segments[0])
      t = SEGMENTS.index(segments[1])
      @segments = SEGMENTS[f..t]
    else
      raise ArgumentError
    end