Class: Rabal::Plugin::License
- Inherits:
-
Object
- Object
- Rabal::Plugin::License
- Defined in:
- lib/rabal/plugin/license.rb
Overview
The license plugin helps the user pick a license for their project. The current available license to choose from are BSD, GPL, LGPG, MIT and Ruby
Constant Summary collapse
- TYPES =
%w[BSD GPL LGPL MIT RUBY]
Instance Method Summary collapse
-
#initialize(options) ⇒ License
constructor
A new instance of License.
Constructor Details
#initialize(options) ⇒ License
Returns a new instance of License.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/rabal/plugin/license.rb', line 15 def initialize() @parameters = OpenStruct.new() validate_parameters suffix = @parameters.flavor # look at all files in our resource directory and any # that have the same suffix as the 'flavor' load it into # the tree. resource_dir = resource_by_name(my_main_tree_name) @tree = DirectoryTree.new(".") Dir.glob(File.join(resource_dir,"*.#{suffix.downcase}")).each do |file| @tree << FileTree.from_file(file) end end |