method

local_variable

local_variable(path)
private

No documentation available.

# 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