Module: KeyValueName::FolderName::InstanceMethods

Includes:
Name::InstanceMethods
Defined in:
lib/key_value_name/mixins/folder_name.rb

Overview

Instance methods of a KeyValueName for a folder.

Instance Attribute Summary

Attributes included from Name::InstanceMethods

#parent

Instance Method Summary collapse

Methods included from Name::InstanceMethods

#<=>, #to_s

Instance Method Details

#destroy!Object



22
23
24
# File 'lib/key_value_name/mixins/folder_name.rb', line 22

def destroy!
  FileUtils.rm_rf(to_s)
end

#exist?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/key_value_name/mixins/folder_name.rb', line 13

def exist?
  Dir.exist?(to_s)
end

#mkdir!Object



17
18
19
20
# File 'lib/key_value_name/mixins/folder_name.rb', line 17

def mkdir!
  FileUtils.mkdir_p(to_s)
  self
end