Method: Ruber::AbstractProject#close
- Defined in:
- lib/ruber/project.rb
#close(save = true) ⇒ Boolean
Closes the project
According to the save parameter, the project may save itself and its extensions' settings or not. In the first case, extensions may stop the project from closing by having their @query_close@ method return false. If save is false, nothing will be saved and the closing can’t be interrupted.
Before closing the project, the #closing signal is emitted. After that, all extensions will be removed (calling their @remove_from_project@ method if they have one).
310 311 312 313 314 315 316 317 318 319 320 |
# File 'lib/ruber/project.rb', line 310 def close save = true if save return false unless query_close return false unless self.save end emit closing(self) @project_extensions.each_key{|k| remove_extension k} Ruber[:components].named_disconnect "remove_component_from_project #{object_id}" Ruber[:components].named_disconnect "register_component_with_project #{object_id}" true end |