Class: PluginDirectory
- Inherits:
-
Object
- Object
- PluginDirectory
- Defined in:
- lib/PluginDirectory.rb
Instance Method Summary collapse
- #create_plugin_directory_structure ⇒ Object
- #create_root_directory_for_plugin ⇒ Object
-
#initialize(options) ⇒ PluginDirectory
constructor
A new instance of PluginDirectory.
Constructor Details
#initialize(options) ⇒ PluginDirectory
Returns a new instance of PluginDirectory.
3 4 5 |
# File 'lib/PluginDirectory.rb', line 3 def initialize() @name, @path, @verbose = [:name], [:path], [:verbose] end |
Instance Method Details
#create_plugin_directory_structure ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/PluginDirectory.rb', line 22 def create_plugin_directory_structure if @verbose puts "Creating Plugin Directory Structure" end Dir.mkdir("src") Dir.mkdir("www") Dir.chdir("src") Dir.mkdir("ios") Dir.mkdir("android") Dir.chdir(@path.to_s + "/" + @name.to_s) end |
#create_root_directory_for_plugin ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/PluginDirectory.rb', line 9 def create_root_directory_for_plugin if @verbose puts "Creating Plugin Root Directory" end unless @path == nil Dir.chdir(@path.to_s) Dir.mkdir(@name.to_s) Dir.chdir(@name.to_s) end end |