Class: Ykutils::YamlXOp
- Includes:
- DebugUtils
- Defined in:
- lib/ykutils/yamlxop.rb
Constant Summary
Constants inherited from YamlOp
Ykutils::YamlOp::TEST_ID_LISTUP_ALL, Ykutils::YamlOp::TEST_ID_NO_VALUE
Constants included from NKFUTIL
Instance Attribute Summary collapse
-
#yaml ⇒ Object
Returns the value of attribute yaml.
Attributes inherited from YamlOp
Instance Method Summary collapse
Methods included from DebugUtils
#clear_d, #d, #d_caller, #d_exit, #d_p, #d_pp, #d_puts, #d_puts_no_empty, #debug_utils_init, #error_exit, #puts_current_method, #puts_d, #puts_no_empty, #w1_puts, #w2_puts
Methods inherited from YamlOp
#dump_ptext_to_file, #dump_to_file, #exchange_ptext, #exec, #extract_value, #import, #importex, #initialize, #listup_all, #listup_domain, #listup_host, #load_yaml, #load_yaml_ifname, #output_yaml, #reform, #sort, #test_listup, #update_yaml, #valid?
Methods included from DataStructOp
#exchange, #make_array, #make_hash, #select_array
Methods included from SpecFileOp
#check_data_complement, #check_data_complement_print_message, #dump_yaml_fileobj, #expand_data, #load_csv_file, #load_csv_file_ex, #load_plain_text_file, #load_yaml_file, #make_data_complement, #open_for_write, #parse_yaml_file, #save_yaml_file, #valid?
Methods included from NKFUTIL
assoc_equal, auto_config_from_inner, auto_config_to_inner, config, convert, get, guess_encoding, #nkf_utf8_file, #puts_sj, #puts_u, set
Constructor Details
This class inherits a constructor from Ykutils::YamlOp
Instance Attribute Details
#yaml ⇒ Object
Returns the value of attribute yaml.
7 8 9 |
# File 'lib/ykutils/yamlxop.rb', line 7 def yaml @yaml end |
Instance Method Details
#load(fname) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/ykutils/yamlxop.rb', line 11 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 |
#yaml2stext ⇒ Object
23 24 25 26 27 28 |
# File 'lib/ykutils/yamlxop.rb', line 23 def yaml2stext yaml_str = YAML.dump(@yaml) yaml_ary = yaml_str.split("\n") @yamlstext = StructuredTextForAccount.new @yamlstext.analyze(yaml_ary) end |