Class: RDF::Tabular::Format
- Inherits:
-
Format
- Object
- Format
- RDF::Tabular::Format
- Defined in:
- lib/rdf/tabular/format.rb
Overview
Tabular Data/CSV format specification.
Class Method Summary collapse
-
.detect(sample) ⇒ Boolean
Sample detection to see if it matches JSON-LD.
Class Method Details
.detect(sample) ⇒ Boolean
Sample detection to see if it matches JSON-LD
Use a text sample to detect the format of an input file. Sub-classes implement a matcher sufficient to detect probably format matches, including disambiguating between other similar formats.
46 47 48 |
# File 'lib/rdf/tabular/format.rb', line 46 def self.detect(sample) !!sample.match(/^(?:(?:\w )+,(?:\w ))$/) end |