module PowerStencil::SystemEntityDefinitions::EntityProjectCommon
Public Instance Methods
buildable?()
click to toggle source
# File lib/power_stencil/system_entity_definitions/entity_project_common.rb, line 34 def buildable? self.class.buildable? end
buildable_by()
click to toggle source
# File lib/power_stencil/system_entity_definitions/entity_project_common.rb, line 30 def buildable_by self.class.buildable_by end
delete(force_files_deletion: false)
click to toggle source
Calls superclass method
# File lib/power_stencil/system_entity_definitions/entity_project_common.rb, line 22 def delete(force_files_deletion: false) unless PowerStencil.project.entity_type_templates_templates[type].nil? PowerStencil.project.delete_template_dir_for_entity self, force: force_files_deletion end super() self end
is_user_entity?()
click to toggle source
# File lib/power_stencil/system_entity_definitions/entity_project_common.rb, line 10 def is_user_entity? not(@is_versioned_entity) end
is_versioned_entity?()
click to toggle source
# File lib/power_stencil/system_entity_definitions/entity_project_common.rb, line 6 def is_versioned_entity? @is_versioned_entity end
save(uri = source_uri, raise_error: true, force_save: false, force_files_generation: false )
click to toggle source
Calls superclass method
# File lib/power_stencil/system_entity_definitions/entity_project_common.rb, line 14 def save(uri = source_uri, raise_error: true, force_save: false, force_files_generation: false ) super(source_uri, raise_error: raise_error, force_save: force_save) unless PowerStencil.project.entity_type_templates_templates[type].nil? PowerStencil.project.generate_template_dir_for_entity self, force: force_files_generation end self end
Protected Instance Methods
create_universe_entity(type, fields = {})
click to toggle source
# File lib/power_stencil/system_entity_definitions/entity_project_common.rb, line 44 def create_universe_entity(type, fields = {}) project_engine.new_entity project_engine.root_universe, type, fields: fields end
project_engine()
click to toggle source
# File lib/power_stencil/system_entity_definitions/entity_project_common.rb, line 40 def project_engine PowerStencil.project.engine end
remove_entity_from_universe(entity)
click to toggle source
# File lib/power_stencil/system_entity_definitions/entity_project_common.rb, line 48 def remove_entity_from_universe(entity) project_engine.root_universe.delete entity end