class Nknm::Lists::Names
Public Class Methods
new(items)
click to toggle source
Create a new list based on an array of items. @param items [Array<String>] @return [Names]
# File lib/nknm/lists/names.rb, line 9 def initialize(items) @names = Array(items).compact end
Public Instance Methods
items()
click to toggle source
Get all the items included in the list. @return [Array<Entry>]
# File lib/nknm/lists/names.rb, line 15 def items @_items ||= @names.map { |n| Entry.new(n) } end