lib/meibo/data_set.rb in meibo-0.14.0 vs lib/meibo/data_set.rb in meibo-0.15.0
- old
+ new
@@ -40,9 +40,14 @@
data_by_sourced_id.fetch(sourced_id)
rescue KeyError
raise DataNotFoundError, "sourcedId: #{sourced_id} が見つかりません"
end
+ def lineno(datum)
+ # NOTE: add one for one-based, and add one for header line
+ find_index(datum)&.+(2)
+ end
+
def where(**conditions)
group_cache[conditions.keys.sort][conditions.values]
end
private