Module: Vagrant::Hmurca::ConfigParser
- Defined in:
- lib/vagrant/hmurca/config_parser.rb
Overview
Public: Global entry point to config parser features.
Constant Summary collapse
- PROCESSOR =
GeneralProcessor
Class Method Summary collapse
-
.parse_file(fname) ⇒ Object
Public: Loads given file and parses it.
-
.parse_string(str) ⇒ Object
Public: Parses given source of the config file.
Class Method Details
.parse_file(fname) ⇒ Object
Public: Loads given file and parses it.
fname - The String name of the config file.
Returns filled processor.
209 210 211 212 |
# File 'lib/vagrant/hmurca/config_parser.rb', line 209 def self.parse_file(fname) p = Booby.open(fname) p.parse_with(PROCESSOR).validate! end |
.parse_string(str) ⇒ Object
Public: Parses given source of the config file.
str - The String source to parse.
Returns filled processor.
219 220 221 222 |
# File 'lib/vagrant/hmurca/config_parser.rb', line 219 def self.parse_string(str) p = Booby.prepare(str) p.parse_with(PROCESSOR).validate! end |