Sha256: 58eb948b846c3a30e9ef0e7884947e62610f678343fcc24dad87be6e0605b310

Contents?: true

Size: 354 Bytes

Versions: 19

Compression:

Stored size: 354 Bytes

Contents

class ProconBypassMan::YamlLoader
  # @param [String] path
  # @return [Hash]
  def self.load(path: )
    YAML.load_file(path).tap do |y|
      # 行末に空白があるとto_yamlしたときに改行コードがエスケープされてしまうのでstrip
      y.transform_values do |v|
        v.strip! if v.is_a?(String)
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
procon_bypass_man-0.3.12 lib/procon_bypass_man/support/yaml_loader.rb
procon_bypass_man-0.3.11 lib/procon_bypass_man/support/yaml_loader.rb
procon_bypass_man-0.3.10 lib/procon_bypass_man/support/yaml_loader.rb
procon_bypass_man-0.3.9 lib/procon_bypass_man/support/yaml_loader.rb
procon_bypass_man-0.3.8.1 lib/procon_bypass_man/support/yaml_loader.rb
procon_bypass_man-0.3.8 lib/procon_bypass_man/support/yaml_loader.rb
procon_bypass_man-0.3.7 lib/procon_bypass_man/support/yaml_loader.rb
procon_bypass_man-0.3.6 lib/procon_bypass_man/support/yaml_loader.rb
procon_bypass_man-0.3.5 lib/procon_bypass_man/support/yaml_loader.rb
procon_bypass_man-0.3.4 lib/procon_bypass_man/support/yaml_loader.rb
procon_bypass_man-0.3.3.1 lib/procon_bypass_man/support/yaml_loader.rb
procon_bypass_man-0.3.3 lib/procon_bypass_man/support/yaml_loader.rb
procon_bypass_man-0.3.2 lib/procon_bypass_man/support/yaml_loader.rb
procon_bypass_man-0.3.1 lib/procon_bypass_man/support/yaml_loader.rb
procon_bypass_man-0.3.0 lib/procon_bypass_man/support/yaml_loader.rb
procon_bypass_man-0.2.3 lib/procon_bypass_man/support/yaml_loader.rb
procon_bypass_man-0.2.2 lib/procon_bypass_man/support/yaml_loader.rb
procon_bypass_man-0.2.1 lib/procon_bypass_man/support/yaml_loader.rb
procon_bypass_man-0.2.0 lib/procon_bypass_man/support/yaml_loader.rb