Module: Language::Mixin
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(s, *a, &b) ⇒ Object
7
8
9
10
11
12
13
14
15
16
|
# File 'lib/language/mixin.rb', line 7
def method_missing(s,*a,&b)
return super(s,*a,&b) if s == Language.current.to_sym
lang = __send__(Language.current)
if lang && lang.respond_to?(s)
lang.__send__(s,*a,&b)
else
super(s,*a,&b)
end
end
|