class CommandButler::CommandParser

Public Class Methods

parse(file_name:file_name) click to toggle source
# 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