Class: Eye::Patch::Settings
- Inherits:
-
Object
- Object
- Eye::Patch::Settings
- Extended by:
- Forwardable
- Defined in:
- lib/eye/patch/settings.rb
Instance Method Summary collapse
-
#initialize(filename) ⇒ Settings
constructor
A new instance of Settings.
Constructor Details
#initialize(filename) ⇒ Settings
Returns a new instance of Settings.
14 15 16 17 18 19 20 21 22 |
# File 'lib/eye/patch/settings.rb', line 14 def initialize(filename) file = File.new(filename) erb = ERB.new(file.read) erb.filename = file.path @settings = YAML.safe_load(erb.result) ensure file&.close end |