Class: Yobi::MatchesPerSnapshot

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/yobi/repository/find.rb,
sig/yobi.rbs

Overview

One snapshot's worth of matches from a Repository#find call.

Instance Method Summary collapse

Instance Method Details

#hitsInteger

Returns:

  • (Integer)


124
125
126
# File 'lib/yobi/repository/find.rb', line 124

def hits
  self["hits"]
end

#matchesArray<Yobi::FindMatch>

Returns:



129
130
131
# File 'lib/yobi/repository/find.rb', line 129

def matches
  @matches ||= (self["matches"] || []).map { |raw| Yobi::FindMatch.new(raw) }
end

#snapshotHash

Returns:

  • (Hash)


119
120
121
# File 'lib/yobi/repository/find.rb', line 119

def snapshot
  self["snapshot"]
end