Class: Txgh::ParseConfig
- Inherits:
-
ParseConfig
- Object
- ParseConfig
- Txgh::ParseConfig
- Defined in:
- lib/txgh/parse_config.rb
Overview
This class wraps the ParseConfig class from the parseconfig gem and provides a way to load config from a string instead of just a file.
Class Method Summary collapse
Class Method Details
.load(contents) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/txgh/parse_config.rb', line 9 def load(contents) tmp = Tempfile.new('parseconfig') tmp.write(contents) tmp.close load_file(tmp.path) ensure tmp.unlink if tmp end |
.load_file(path) ⇒ Object
18 19 20 21 |
# File 'lib/txgh/parse_config.rb', line 18 def load_file(path) # use the default file loading logic new(path) end |