Sha256: 7f95e6cc2a24fe9484737b948c7ff1ddec3e9c01f0260b7b2f0efde8429fa7c7

Contents?: true

Size: 348 Bytes

Versions: 1

Compression:

Stored size: 348 Bytes

Contents

require "yaml"
require "./lib/vym/hierarchical_parser"

module Vym
  class YamlParser < HierarchicalParser
    def main_concept_regex
      /\s*---\s*\n-\s+(.+):?\s*$/
    end

    def suffix_regex
      /\s*:\s*$/
    end

    def branch_regex
      /^(\s*)-\s+(.+):?\s*$/
    end

    def get_level_from_size(size)
      size/2
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vym-0.1.4 lib/vym/yaml_parser.rb