Sha256: cfc402cd5fa6c14fb56ccfafd7a179d2c33a586d2d2e9fdd7a3b20d2f78f512a
Contents?: true
Size: 294 Bytes
Versions: 3
Compression:
Stored size: 294 Bytes
Contents
require 'command_butler/command_object' require 'yaml' module CommandButler class CommandParser 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 end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
command_butler-0.0.3 | lib/command_butler/command_parser.rb |
command_butler-0.0.2 | lib/command_butler/command_parser.rb |
command_butler-0.0.1 | lib/command_butler/command_parser.rb |