Module: Tins::FileBinary::ClassMethods

Defined in:
lib/tins/file_binary.rb

Instance Method Summary collapse

Instance Method Details

#ascii?(name, options = {}) ⇒ Boolean

Returns true if the file with name name is considered to be ascii using the FileBinary#ascii? method.

Returns:

  • (Boolean)


78
79
80
# File 'lib/tins/file_binary.rb', line 78

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

#binary?(name, options = {}) ⇒ Boolean

Returns true if the file with name name is considered to be binary using the FileBinary#binary? method.

Returns:

  • (Boolean)


72
73
74
# File 'lib/tins/file_binary.rb', line 72

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