Sha256: e1effc4d8c2af4017e225d08b4b92f5f179f683b857026eb11aa7b68177f36f7
Contents?: true
Size: 988 Bytes
Versions: 44
Compression:
Stored size: 988 Bytes
Contents
# frozen_string_literal: true require 'eac_ruby_utils/core_ext' require 'ehbrs/executables' require 'fileutils' require 'inifile' module Ehbrs module Vg module Wii module Wit module Parsers class Info SECTION_NAME_PATTERN = /\A#{::Regexp.quote('IMAGE-FORMAT:')}(.+)\z/.freeze enable_simple_cache common_constructor :output private def images_uncached ini = ::IniFile.new(content: output) r = {} ini.sections.each do |section_name| image_section_name = parse_image_section_name(section_name) r[image_section_name] = ini[section_name] if image_section_name.present? end r end def parse_image_section_name(section_name) SECTION_NAME_PATTERN.match(section_name).if_present { |m| m[1] } end end end end end end end
Version data entries
44 entries across 44 versions & 1 rubygems