Sha256: f7581d32dcb0d527ac037fce565ae713ac82cd1cb00d263763535f73dfe016fb

Contents?: true

Size: 783 Bytes

Versions: 3

Compression:

Stored size: 783 Bytes

Contents

require "ykutils/debugutils"
require "ykutils/stextx"
require "ykutils/yamlop"

module Ykutils
  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
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ykutils-0.1.4 lib/ykutils/yamlxop.rb
ykutils-0.1.3 lib/ykutils/yamlxop.rb
ykutils-0.1.1 lib/ykutils/yamlxop.rb