dimanche 26 novembre 2017

What part of the class name is a module?

In a rails project I have the class:

class Police::Office 
end

Now I create an Interactor in the same namespace:

class Police::Office::ConstructInteractor 
end 

1. Is this allowed or can it provoke name clashes?

2. What is Police::Office::ConstructInteractor?

Is it a class in a module like:

module Police::Office
  class ConstructInteractor 
  end
end 

Or a class in a class?

class Police::Office
  class ConstructInteractor 
  end
end

Thank you

Aucun commentaire:

Enregistrer un commentaire