Class: Object
- Inherits:
-
BasicObject
- Defined in:
- lib/BOAST/Algorithm.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(m, *a, &b) ⇒ Object
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# File 'lib/BOAST/Algorithm.rb', line 4
def method_missing(m, *a, &b)
s=nil
klass = begin
s = (self.is_a?(Module) ? self : self.class)
s.const_get(m)
rescue NameError
end
return klass.send(:parens, *a, &b) if klass.respond_to? :parens
return BOAST::FuncCall::new(m,*a,&b) if s == BOAST
orig_method_missing m, *a, &b
end
|
Instance Method Details
#orig_method_missing ⇒ Object
2
|
# File 'lib/BOAST/Algorithm.rb', line 2
alias_method :orig_method_missing, :method_missing
|