Module: Tem::Hive

Defined in:
lib/tem/hive.rb

Overview

The TEM’s configuation hive

Constant Summary collapse

@@hive_dir =
File.join(Gem.user_home, ".tem")

Class Method Summary collapse

Class Method Details

.create(*hive_entry) ⇒ Object



12
13
14
15
16
17
# File 'lib/tem/hive.rb', line 12

def self.create(*hive_entry)
  path = File.join(@@hive_dir, *hive_entry)
  FileUtils.mkdir_p File.dirname(path)
  File.open(path, "w") { |f| }
  return path
end

.path_to(*hive_entry) ⇒ Object



8
9
10
# File 'lib/tem/hive.rb', line 8

def self.path_to(*hive_entry)
  File.join(@@hive_dir, *hive_entry)
end