Class: Prepd::Client
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Prepd::Client
- Defined in:
- lib/prepd/models.rb
Instance Attribute Summary collapse
-
#data_dir ⇒ Object
Returns the value of attribute data_dir.
Instance Method Summary collapse
Instance Attribute Details
#data_dir ⇒ Object
Returns the value of attribute data_dir.
3 4 5 |
# File 'lib/prepd/models.rb', line 3 def data_dir @data_dir end |
Instance Method Details
#destroy_client ⇒ Object
22 23 24 |
# File 'lib/prepd/models.rb', line 22 def destroy_client FileUtils.rm_rf("#{path}") end |
#set_defaults ⇒ Object
14 15 16 |
# File 'lib/prepd/models.rb', line 14 def set_defaults self.path = "#{Prepd.['DATA_DIR']}/#{name}" end |
#setup ⇒ Object
18 19 20 |
# File 'lib/prepd/models.rb', line 18 def setup FileUtils.mkdir_p(path) unless Dir.exists?(path) end |