class ActionDispatch::Journey::Format
Experimental RBS support (using type sampling data from the type_fusion
project).
# sig/action_dispatch/journey/visitors.rbs class ActionDispatch::Journey::Format def evaluate: (Hash hash) -> untyped end
def self.required_path(symbol)
def self.required_path(symbol) Parameter.new symbol, ESCAPE_PATH end
def self.required_segment(symbol)
def self.required_segment(symbol) Parameter.new symbol, ESCAPE_SEGMENT end
def evaluate(hash)
Experimental RBS support (using type sampling data from the type_fusion
project).
def evaluate: (gem | String | version | String | class | String hash) -> untyped
This signature was generated using 1 sample from 1 application.
def evaluate(hash) parts = @parts.dup @parameters.each do |index| param = parts[index] value = hash[param.name] return "" if value.nil? parts[index] = param.escape value end @children.each { |index| parts[index] = parts[index].evaluate(hash) } parts.join end
def initialize(parts)
def initialize(parts) @parts = parts @children = [] @parameters = [] parts.each_with_index do |object, i| case object when Journey::Format @children << i when Parameter @parameters << i end end end