Module: Utils::FileXt::ClassMethods

Defined in:
lib/utils/file_xt.rb

Instance Method Summary collapse

Instance Method Details

#ascii?(name) ⇒ Boolean

Returns:

  • (Boolean)

41
42
43
# File 'lib/utils/file_xt.rb', line 41

def ascii?(name)
  File.open(name, 'rb') { |f| f.ascii? }
end

#binary?(name) ⇒ Boolean

Returns:

  • (Boolean)

37
38
39
# File 'lib/utils/file_xt.rb', line 37

def binary?(name)
  File.open(name, 'rb') { |f| f.binary? }
end