Class: FlatKit::Jsonl::Format
- Defined in:
- lib/flat_kit/jsonl/format.rb
Overview
Internal: JSONL format class holding the metadata about the JSONL format
Class Method Summary collapse
Methods inherited from Format
for, for_with_fallback, for_with_fallback!, #format_name
Methods included from DescendantTracker
#children, #find_child, #find_children, #inherited
Class Method Details
.format_name ⇒ Object
8 9 10 |
# File 'lib/flat_kit/jsonl/format.rb', line 8 def self.format_name "jsonl" end |
.handles?(filename) ⇒ Boolean
12 13 14 15 16 17 18 |
# File 'lib/flat_kit/jsonl/format.rb', line 12 def self.handles?(filename) parts = filename.split(".") %w[json jsonl ndjson].each do |ext| return true if parts.include?(ext) end false end |