Flowdock
method

local_variable

Importance_0
Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: ObjectRendering
local_variable(path) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionview/lib/action_view/renderer/abstract_renderer.rb, line 43
        def local_variable(path)
          if as = @options[:as]
            raise_invalid_option_as(as) unless /\A[a-z_]\w*\z/.match?(as.to_s)
            as.to_sym
          else
            base = path.end_with?("/") ? "" : File.basename(path)
            raise_invalid_identifier(path) unless base =~ /\A_?(.*?)(?:\.\w+)*\z/
            $1.to_sym
          end
        end
Register or log in to add new notes.