lib/vulkan/conversions.rb
# Using the specified regular expression, scans the list of Vulkan
# constants, looking for the first constant whose name matches the regular
# expression AND whose value matches the given value. The return value is
# the first regex group (`$1`) from the match, converted to a symbol.
Using the specified regular expression, scans the list of Vulkan
constants, looking for the first constant whose name matches the regular
expression AND whose value matches the given value. The return value is
the first regex group (`$1`) from the match, converted to a symbol.
Using the specified regular expression scans the list of Vulkan constants looking for the first constant whose name matches the regular expression AND whose value matches the given value . The return value is the first regex group ( ` $1 ` ) from the match converted to a symbol .
def const_to_symbol(val, rx)
      Vulkan.constants.each do |konst|
        if konst.to_s[rx]
          return $1.downcase.to_sym if val == Vulkan.const_get(konst)
        end
      end
      val
    end
def const_to_symbol ( val , rx ) Vulkan . constants . each do | konst | if konst . to_s [ rx ] return $1 . downcase . to_sym if val == Vulkan . const_get ( konst ) end end val end
Using the specified regular expression, scans the list of Vulkan
constants, looking for the first constant whose name matches the regular
expression AND whose value matches the given value.
Using the specified regular expression scans the list of Vulkan constants looking for the first constant whose name matches the regular expression AND whose value matches the given value .
val
<not_specific>
rx
<not_specific>