Class: CommandButler::CommandParser
- Inherits:
-
Object
- Object
- CommandButler::CommandParser
- Defined in:
- lib/command_butler/command_parser.rb
Class Method Summary collapse
Class Method Details
.parse(file_name: file_name) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/command_butler/command_parser.rb', line 5 def self.parse(file_name:file_name) YAML.load_file(file_name).map do |y| vars = (y.is_a? String)? {"command"=> y} : y CommandObject.new(vars) end end |