require "matter/version" require 'fileutils' require 'yaml' require "matter/cli/application" module Matter def self.root File.expand_path '../..', __FILE__ end class YamlAdaptor attr_accessor :filename,:dir def initilize end def self.build( filename = 'Matfile' , dir = '.' ,struct) @filename=filename @dir=dir FileUtils.touch("#{@dir}/#{@filename}.yml") # config = YAML.load_file("#{@dir}/#{@filename}.yml") # puts config['last_update'] #in my file this is set to "some data" File.open("#{@dir}/#{@filename}.yml",'w') do |yamlFile| yamlFile.write struct.to_yaml end end end end