Class: FlatKit::Xsv::Format
Overview
Internal: xsv format class holding the metadata about the xsv format utilities
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/xsv/format.rb', line 8 def self.format_name "xsv" end |
.handles?(filename) ⇒ Boolean
12 13 14 15 16 17 18 |
# File 'lib/flat_kit/xsv/format.rb', line 12 def self.handles?(filename) parts = filename.split(".") %w[csv tsv txt].each do |ext| return true if parts.include?(ext) end false end |