Class: Rabal::ProjectTree

Inherits:
DirectoryTree show all
Defined in:
lib/rabal/project_tree.rb

Overview

The ProjectTree represents the master configuration/specification of a project.

Instance Attribute Summary

Attributes inherited from DirectoryTree

#dir_name, #parent_dir

Attributes inherited from Tree

#children, #name, #parameters, #parent

Instance Method Summary collapse

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, #post_add, #root, #size, #tree_at_path, #walk

Constructor Details

#initialize(project_name, options) ⇒ ProjectTree

FIXME: this should derive a whole bunch of instance variables and delegate items to a Gem specification.



12
13
14
15
16
17
18
19
20
# File 'lib/rabal/project_tree.rb', line 12

def initialize(project_name,options)
    super(project_name)
    if options.kind_of?(OpenStruct) then
        options = options.marshal_dump
    end
    @parameters = OpenStruct.new(options)
    @parameters.raw_project_name = project_name
    @parameters.project_name = project_name.gsub(/^ruby-/,'')
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Rabal::Tree