Class: PluginDirectory

Inherits:
Object
  • Object
show all
Defined in:
lib/PluginDirectory.rb

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ PluginDirectory

Returns a new instance of PluginDirectory.



3
4
5
# File 'lib/PluginDirectory.rb', line 3

def initialize(options)
  @name, @path, @verbose = options[:name], options[:path], options[:verbose]
end

Instance Method Details

#create_plugin_directory_structureObject



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_pluginObject



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