Class: Arpa::Services::Resources::Create::ResourceCreator
- Inherits:
-
Object
- Object
- Arpa::Services::Resources::Create::ResourceCreator
- Defined in:
- lib/arpa/services/resources/create/resource_creator.rb
Instance Method Summary collapse
Instance Method Details
#create(resourceable) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/arpa/services/resources/create/resource_creator.rb', line 6 def create(resourceable) resource = resource_instance(resourceable) resource_found = finder_repo.by_full_name(resource.full_name) return resource_found if resource_found validate_resource(resource) creator_repo.create(resource) end |