Sha256: 1a957441257209c187b46afacd4f1ac3a76ead78fc5d3a641fbd73c7aab413b6

Contents?: true

Size: 646 Bytes

Versions: 1

Compression:

Stored size: 646 Bytes

Contents

require 'debugutils'
require 'stextx'
require 'yamlop'

class YamlXOp < YamlOp
  attr_accessor :yaml

  include DebugUtils

  def initialize( opt , args , debug )
    debug_utils_init
    set_debug( debug )
  end

  def load( fname )
#    d_puts "3"
#    puts_current_method

#    d_puts "fname=#{fname}"
    @fname = fname
#    @pstext = StructuredTextForX.new
#    puts "fname=#{fname}"
#    @pstext.load_analyze( fname )
    @yaml = load_yaml_file( fname )
  end

  def yaml2stext
    yaml_str = YAML.dump( @yaml )
    yaml_ary = yaml_str.split("\n")
    @yamlstext = StructuredTextForAccount.new
    @yamlstext.analyze( yaml_ary )
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ykutils-0.1.0 lib/ykutils/yamlxop.rb