Class: Rabal::PluginTree
- Inherits:
-
DirectoryTree
- Object
- Tree
- ActionTree
- DirectoryTree
- Rabal::PluginTree
- Includes:
- Util
- Defined in:
- lib/rabal/plugin_tree.rb
Overview
Represents the root of a plugin directory structure. This plugin could also only represent a single FileTree by having the ‘directory’ it represents being ‘.’
Instance Attribute Summary collapse
-
#src_directory ⇒ Object
the source directory from which the project is generated.
Attributes inherited from DirectoryTree
Attributes inherited from Tree
#children, #name, #parameters, #parent
Instance Method Summary collapse
-
#initialize(options, src_directory, dest_directory = ".") ⇒ PluginTree
constructor
create a new Plugin Tree based upon a source directory.
-
#post_add ⇒ Object
populating the tree needs to take place after the PluginTree has been added to the Tree, but before the processing of the tree takes place.
Methods included from Util
Methods inherited from DirectoryTree
#action, #after_action, #before_action
Methods inherited from ActionTree
#action, #after_action, #before_action, #process
Methods inherited from Tree
#<<, #add_at_path, #current_path, #depth, #each, #find_subtree, #has_subtree?, #is_leaf?, #is_root?, #method_missing, #root, #size, #tree_at_path, #walk
Constructor Details
#initialize(options, src_directory, dest_directory = ".") ⇒ PluginTree
create a new Plugin Tree based upon a source directory. This ‘mounts’ the src_directory into the dest_directory in the project. The dest_directory defaults to “.” . The options
are a hash that are propogated to the parameters
member variable.
21 22 23 24 25 |
# File 'lib/rabal/plugin_tree.rb', line 21 def initialize(,src_directory,dest_directory= ".") super(dest_directory) @src_directory = src_directory @parameters = OpenStruct.new() end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Rabal::Tree
Instance Attribute Details
#src_directory ⇒ Object
the source directory from which the project is generated
14 15 16 |
# File 'lib/rabal/plugin_tree.rb', line 14 def src_directory @src_directory end |
Instance Method Details
#post_add ⇒ Object
populating the tree needs to take place after the PluginTree has been added to the Tree, but before the processing of the tree takes place
32 33 34 |
# File 'lib/rabal/plugin_tree.rb', line 32 def post_add populate_tree(src_directory) end |