Module: Kryten::Setup
- Defined in:
- lib/kryten/setup.rb
Class Method Summary collapse
Class Method Details
.base_path ⇒ Object
8 9 10 |
# File 'lib/kryten/setup.rb', line 8 def base_path File.(File.join(ENV['BUNDLE_GEMFILE'], '..')) end |
.configure ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/kryten/setup.rb', line 12 def configure classname = self.name.split('::') classname = if classname.one? classname.first.downcase else classname[0...-1].collect(&:downcase).join('-') end file = File.open(File.join(self.base_path, "config/#{classname}.yml")) YAML.load(file)[classname] end |