Module: TT::Utils

Extended by:
Utils
Included in:
Utils
Defined in:
lib/t_t/base.rb

Constant Summary collapse

DOWNCASE =
lambda { |str, locale| (locale == :en) ? str.downcase : str.mb_chars.downcase.to_s }

Instance Method Summary collapse

Instance Method Details

#lookup(prefix, base_suffix) ⇒ Object



12
13
14
# File 'lib/t_t/base.rb', line 12

def lookup(prefix, base_suffix)
  prefix ? prefix_lookup(prefix, base_suffix) : simple_lookup(base_suffix)
end

#to_parts(str) ⇒ Object



16
17
18
# File 'lib/t_t/base.rb', line 16

def to_parts(str)
  str.to_s.underscore.split(/\.|\//)
end