Module: Cel::CelMethods::InstanceMethods
- Defined in:
- lib/cel/ast/cel_methods.rb
Instance Method Summary collapse
Instance Method Details
#cel_method_defined?(meth) ⇒ Boolean
45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/cel/ast/cel_methods.rb', line 45 def cel_method_defined?(meth) klass = self.class while klass != Literal return true if klass.cel_methods.include?(meth) klass = klass.superclass end klass.cel_methods.include?(meth) end |
#cel_send(meth, *args) ⇒ Object
38 39 40 41 42 43 |
# File 'lib/cel/ast/cel_methods.rb', line 38 def cel_send(meth, *args) meth = meth.to_sym raise NoCelMethodError unless cel_method_defined?(meth) public_send(meth, *args) end |