Sha256: d0aa8594ea3c7e953c3b53afa801a8d3545aa71a189d23b7da4e593888b6484c
Contents?: true
Size: 436 Bytes
Versions: 6
Compression:
Stored size: 436 Bytes
Contents
module GetToWork class MenuPresenter def self.with_collection(options) new(options) end def initialize(options) @options = options end def table @options.map.with_index do |option, i| [i + 1, option.name] end end def item_for(choice:) index = choice.to_i - 1 @options[index] end def menu_limit (1..@options.count).map(&:to_s) end end end
Version data entries
6 entries across 6 versions & 1 rubygems