我有这个:
# /app/events/account_cancelled.rb:
module Events
class AccountCancelled < Base::TrackEvent
#/app/events/base/track_event.rb:
module Events
module Base
class TrackEvent < Event
#/app/services/website/base.rb:
module Services
module Website
class Base
我收到一个错误:
Expected <snip>/app/services/website/base.rb to define Base
from <snip>/app/events/account_cancelled.rb:2
我尝试完全限定因此的类定义AccountCancelled
:
module Events
class AccountCancelled < Events::Base::TrackEvent
但我得到完全相同的错误。顺便说一句,在我将所有这些lib
从app
. 这里发生了什么?
更新:
我也尝试过继承自::Events::Base::TrackEvent
. 同样的错误。