class Nknm::List::Matches
Attributes
items[R]
Public Class Methods
new(items = nil)
click to toggle source
# File lib/nknm/list/matches.rb, line 9 def initialize(items = nil) @items = Array(items).compact end
Public Instance Methods
each() { |i| ... }
click to toggle source
# File lib/nknm/list/matches.rb, line 13 def each items.each { |i| yield i } end
empty?()
click to toggle source
Is this set of matches empty? @return [Boolean]
# File lib/nknm/list/matches.rb, line 19 def empty? items.length == 0 end
single?()
click to toggle source
Does this set of matches contain a single item? @return [Boolean]
# File lib/nknm/list/matches.rb, line 25 def single? items.length == 1 end