Sha256: 71415f84880e40a5ebdfc7646f8b4da6fb0bf21bee3de45ec4cb1d7d9d2a8543
Contents?: true
Size: 451 Bytes
Versions: 1
Compression:
Stored size: 451 Bytes
Contents
require "yaml" require 'iniparse' module Invoker class Config attr_accessor :processes def initialize(filename) @ini_content = File.read(filename) @processes = process_ini(@ini_content) end def process_ini(ini_content) document = IniParse.parse(ini_content) document.map do |section| OpenStruct.new(label: section.key, dir: section["directory"], cmd: section["command"]) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
invoker-0.0.2 | lib/invoker/config.rb |