Module: Decoct::Dmeta::ClassMethods
- Defined in:
- lib/decoct/dmeta.rb
Instance Method Summary collapse
Instance Method Details
#create_dir(name) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/decoct/dmeta.rb', line 17 def create_dir(name) if name.is_a?(Array) name.map {|x| create_dir(x)} else define_method("create_#{name}") do path = "#{@app_name}#{File::SEPARATOR}#{name}" Dir.mkdir(path) if !test(?d, path) puts "Created #{path}" end end end |