Method: Eye::Dsl.parse
- Defined in:
- lib/eye/dsl.rb
.parse(content = nil, filename = nil) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/eye/dsl.rb', line 27 def parse(content = nil, filename = nil) Eye.parsed_config = Eye::Config.new Eye.parsed_filename = filename Eye.parsed_default_app = nil content = File.read(filename) if content.blank? silence_warnings do Kernel.eval(content, Eye::BINDING, filename.to_s) end Eye.parsed_config.validate!(false) Eye.parsed_config end |