Module: Dhall::Parser::UrlPath

Defined in:
lib/dhall/parser.rb

Instance Method Summary collapse

Instance Method Details

#valueObject



661
662
663
664
665
666
667
668
669
670
# File 'lib/dhall/parser.rb', line 661

def value
  "/" + matches.map { |pc|
    if pc.captures.key?(:path_component)
      # We escape here because ruby stdlib URI just stores path unparsed
      pc.value(Util.method(:uri_escape))
    else
      pc.string[1..-1]
    end
  }.join("/")
end