Module: RoSupport::FileActions
- Included in:
- RoSupport
- Defined in:
- lib/ro_support/file_actions.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
-
.included(base) ⇒ Object
Attentions: module_name must be like file_name eg: module Array, array.rb is right eg: moduel ArrayDSL, array.rb is wrong The File tree is like this: a -b.rb -c.rb a.rb.
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
Attentions: module_name must be like file_name eg: module Array, array.rb is right eg: moduel ArrayDSL, array.rb is wrong The File tree is like this: a -b.rb -c.rb a.rb
24 25 26 |
# File 'lib/ro_support/file_actions.rb', line 24 def self.included(base) base.extend ClassMethods end |
Instance Method Details
#create_dir_file(path) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/ro_support/file_actions.rb', line 4 def create_dir_file(path) file = File.basename path dir = path.gsub file, '' FileUtils.mkdir_p(dir) File.new(path, 'w+') end |
#get_tree_in(dir) ⇒ Object
11 12 13 |
# File 'lib/ro_support/file_actions.rb', line 11 def get_tree_in(dir) end |