title: Rails Grape API include module - Zeitwerk::NameError - expected file to define constant, but didn't:
body: <p>I want to make a small code refactor and extract client external client from gem to a separate module (it's use to connect to the DatoCMS API via <code>gem 'dato'</code>). My standard class, which works well, look like:</p>
  <p><code>app/services/receive_webhook/fetch_model_name.rb</code></p>
  <pre><code>module ReceiveWebhook
    class FetchModelName
      def initialize(model_id)
        @model_id = model_id
      end
  
      def call
        fetch_model(@model_id).dig('name')
      end
  
      private
  
      def client
        @client ||= Dato::Site::Client.new(Rails.application.credentials.datocms_api_token)
      end
  
      def fetch_model(model_id)
        client.item_types.find(model_id)
      end
    end
  end
  </code></pre>
  <p>I want to separate <code>client</code> method to a different module and include it in <code>FetchModelName</code> class (like in standard Rails app). To do so I use below code:</p>
  <p><code>app/dato_cms_api/dato_client.rb</code></p>
  <pre><code>module DatoCmsApi
    module DatoClient
      def client
        @client ||= Dato::Site::Client.new(Rails.application.credentials.datocms_api_token)
      end
    end
  end
  </code></pre>
  <p>With updated <code>FetchModelName</code> class:
  <code>app/services/receive_webhook/fetch_model_name.rb</code></p>
  <pre><code>module ReceiveWebhook
    class FetchModelName
      include ::DatoClient
  
      def initialize(model_id)
        @model_id = model_id
      end
  
      def call
        fetch_model(@model_id).dig('name')
      end
  
      private
  
      def fetch_model(model_id)
        client.item_types.find(model_id)
      end
    end
  end
  </code></pre>
  <p>But I'm getting an error:</p>
  <pre><code>Zeitwerk::NameError - expected file app/dato_cms_api/dato_client.rb to define constant DatoClient, but didn't:
    app/services/receive_webhook/fetch_model_name.rb:5:in `&lt;class:FetchModelName&gt;'
    app/services/receive_webhook/fetch_model_name.rb:4:in `&lt;module:ReceiveWebhook&gt;'
    app/services/receive_webhook/fetch_model_name.rb:3:in `&lt;main&gt;'
    app/controllers/api/v1/webhooks/dato_cms/receive_webhook.rb:29:in `block in &lt;class:ReceiveWebhook&gt;'
  </code></pre>
  <p>Does Grape API not support include module practice?</p>