Module: WtfLang::Extension

Included in:
String, Symbol
Defined in:
lib/wtf_lang/core_ext/extension.rb

Instance Method Summary collapse

Instance Method Details

#detect_langObject



7
8
9
# File 'lib/wtf_lang/core_ext/extension.rb', line 7

def detect_lang
  @detected_lang ||= WtfLang::API.detect self
end

#full_langObject



15
16
17
# File 'lib/wtf_lang/core_ext/extension.rb', line 15

def full_lang
  detect_lang && detect_lang.full_lang
end

#langObject



11
12
13
# File 'lib/wtf_lang/core_ext/extension.rb', line 11

def lang
  detect_lang && detect_lang.lang
end

#lang_confidenceObject



19
20
21
# File 'lib/wtf_lang/core_ext/extension.rb', line 19

def lang_confidence
  detect_lang && detect_lang.lang_confidence
end