Class: Safer::IVarFactory::Prefix::Last

Inherits:
Safer::IVarFactory::Prefix show all
Defined in:
lib/safer/ivarfactory/prefix.rb

Overview

Safer::IVarFactory::Prefix::Full

Class Method Summary collapse

Methods inherited from Safer::IVarFactory::Prefix

is_anon

Class Method Details

.class_symbol_prefix(klass) ⇒ Object



22
23
24
25
26
27
# File 'lib/safer/ivarfactory/prefix.rb', line 22

def self.class_symbol_prefix(klass)
  el = klass.to_s.split('::').reverse.find do |obj|
    ! self.is_anon(obj)
  end
  el.downcase
end