class Gamefic::Props::MultiplePartial
A subclass of MultipleChoice
props that matches partial input.
Private Instance Methods
Source
# File lib/gamefic/props/multiple_partial.rb, line 10 def index_by_text matches = options.map.with_index { |text, idx| next idx if text.downcase.start_with?(input.downcase) }.compact matches.first if matches.one? end