Module: SOCMaker::YAML_EXT

Included in:
Conf, CoreDef, IfcSpc, LibInc, SOCDef
Defined in:
lib/soc_maker.rb

Overview

small module to extend classes, which need to be written as yaml output

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#src_dirObject

we remember always, were we’ve loaded a yaml file



250
251
252
# File 'lib/soc_maker.rb', line 250

def src_dir
  @src_dir
end

Instance Method Details

#save_yaml(args) ⇒ Object



252
253
254
255
# File 'lib/soc_maker.rb', line 252

def save_yaml( args )
  path =  args.size==0 ? @spec_path : args.first
  File.open( path, 'w') {|f| f.write SOCMaker::YPP.from_yaml( YAML.dump( self ) ) } 
end