Class: XlsFunction::Evaluators::Functions::Find
- Inherits:
-
XlsFunction::Evaluators::FunctionEvaluator
- Object
- XlsFunction::Evaluators::FunctionEvaluator
- XlsFunction::Evaluators::Functions::Find
- Defined in:
- lib/xls_function/evaluators/functions/find.rb
Instance Method Summary collapse
Methods inherited from XlsFunction::Evaluators::FunctionEvaluator
#arg_list, #before_eval, #convert_to, create, #detect_error, #error?, #error_message, #eval_arglist, #eval_or_map_eval, #evaluate, #evaluate_or_self, #initialize, #map_eval, to_h, #to_proc, to_proc, translated_description, #variant_context
Methods included from ClassDictionary
Methods included from ErrorDetector
#class_info, #class_name, included, #rescue_with
Methods included from ArgumentsDefinable
Methods included from Evaluable
Constructor Details
This class inherits a constructor from XlsFunction::Evaluators::FunctionEvaluator
Instance Method Details
#eval ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/xls_function/evaluators/functions/find.rb', line 11 def eval index = within_text.index(find_text, start - 1) if index index + 1 else ::XlsFunction::ErrorValue.value!(missing_target) end end |
#missing_target ⇒ Object
21 22 23 24 |
# File 'lib/xls_function/evaluators/functions/find.rb', line 21 def missing_target = (:missing_target, source: within_text, target: find_text) class_info() end |