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: name_value_hash.rb
    path of file: ./repos/SimpleAMS/lib/simple_ams/options/concerns
    
    the code of the file until where you have to start completion: require 'simple_ams'

class SimpleAMS::Options
  module Concerns::NameValueHash
    attr_reader :name, :value, :options

   
    
    def initialize(name, value, options = {}, resource:, serializer:)
      @name = name.is_a?(String) ? name.to_sym : name
      if value.respond_to?(:call)
        @volatile = true
        computed_value = value.call(resource, serializer)
        if computed_value.is_a?(Array) && computed_value.length > 1
          @value = computed_value[0]
          @options = (computed_value[-1] || {}).merge(options || {})
        else
          @value = computed_value
          @options = options || {}
        end