Module: SOCMaker::YAML_EXT
Overview
small module to extend classes, which need to be written as yaml output
Instance Attribute Summary collapse
-
#src_dir ⇒ Object
we remember always, were we’ve loaded a yaml file.
Instance Method Summary collapse
Instance Attribute Details
#src_dir ⇒ Object
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 |