Sha256: 399121b5b42584b085e2d2d4187f020772e1f840e47dada739bb16a1079c5057
Contents?: true
Size: 569 Bytes
Versions: 34
Compression:
Stored size: 569 Bytes
Contents
# frozen_string_literal: true require 'active_support/core_ext/object/blank' module Avm # String with paths like PATH variable. # Note: the separator is not system dependent. class PathString < String SEPARATOR = ':' class << self # Shortcut for [Avm::Paths.new(string).paths]. def paths(string) new(string).paths end end def initialize(string = nil) super(string.to_s) end # @return [Array] List of paths. Blank paths are rejected. def paths split(SEPARATOR).compact_blank end end end
Version data entries
34 entries across 34 versions & 2 rubygems