Class: PointRb::LayoutStorageManager
- Inherits:
-
Object
- Object
- PointRb::LayoutStorageManager
- Includes:
- BobTheHelper::FileSystem
- Defined in:
- lib/pointrb/layout_storage_manager.rb
Instance Method Summary collapse
-
#initialize(layout_directory, layout_file = LayoutFile) ⇒ LayoutStorageManager
constructor
A new instance of LayoutStorageManager.
- #retrieve(path) ⇒ Object
- #retrieve_all ⇒ Object
Methods included from BobTheHelper::FileSystem
#cleanup_working_directory, #create_directory, #create_file, #create_working_directory, #delete_directory, #delete_file, #delete_working_directory, #expand_path, #path_does_not_exist?, #path_exists?, #path_matches?, #raise_if_forbidden_path_for_create_operation, #raise_if_forbidden_path_for_delete_operation, #read_file, #switch_to_working_directory
Constructor Details
#initialize(layout_directory, layout_file = LayoutFile) ⇒ LayoutStorageManager
Returns a new instance of LayoutStorageManager.
10 11 12 13 14 |
# File 'lib/pointrb/layout_storage_manager.rb', line 10 def initialize(layout_directory, layout_file=LayoutFile) @layout_directory = layout_directory @layout_file_klass = layout_file @layout_files = retrieve_layout_files('*.layout') end |
Instance Method Details
#retrieve(path) ⇒ Object
16 17 18 |
# File 'lib/pointrb/layout_storage_manager.rb', line 16 def retrieve(path) @layout_files.find { |l| l.path == path} end |
#retrieve_all ⇒ Object
20 21 22 |
# File 'lib/pointrb/layout_storage_manager.rb', line 20 def retrieve_all @layout_files end |