Module: Gribr::CoreExt::File::ClassMethods

Defined in:
lib/gribr/core_ext/file.rb

Instance Method Summary collapse

Instance Method Details

#gribfile?(path) ⇒ Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/gribr/core_ext/file.rb', line 27

def gribfile?(path)
  ::File.open(path.respond_to?(:path) ? path.path : path) { |file| file.read(4) == "GRIB" }
end