Class: FlatKit::Jsonl::Format
- Inherits:
-
Format
- Object
- Format
- FlatKit::Jsonl::Format
show all
- 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
#children, #find_child, #find_children, #inherited
Class Method Details
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
|
.reader ⇒ Object
20
21
22
|
# File 'lib/flat_kit/jsonl/format.rb', line 20
def self.reader
::FlatKit::Jsonl::Reader
end
|
.writer ⇒ Object
24
25
26
|
# File 'lib/flat_kit/jsonl/format.rb', line 24
def self.writer
::FlatKit::Jsonl::Writer
end
|