Class: DecisionAgent::Dmn::Feel::Functions::SubstringAfter
- Inherits:
-
Base
- Object
- Base
- DecisionAgent::Dmn::Feel::Functions::SubstringAfter
show all
- Defined in:
- lib/decision_agent/dmn/feel/functions.rb
Class Method Summary
collapse
Methods inherited from Base
register, validate_arg_count
Class Method Details
.call(args, _context = {}) ⇒ Object
135
136
137
138
139
140
141
|
# File 'lib/decision_agent/dmn/feel/functions.rb', line 135
def self.call(args, _context = {})
validate_arg_count(args, 2)
str = args[0].to_s
match = args[1].to_s
idx = str.index(match)
idx ? str[(idx + match.length)..] : ""
end
|