Module: Tins::FileBinary::ClassMethods
- Defined in:
- lib/tins/file_binary.rb
Instance Method Summary collapse
-
#ascii?(name, options = {}) ⇒ Boolean
Returns true if the file with name
name
is considered to be ascii using the FileBinary#ascii? method. -
#binary?(name, options = {}) ⇒ Boolean
Returns true if the file with name
name
is considered to be binary using the FileBinary#binary? method.
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.
76 77 78 |
# File 'lib/tins/file_binary.rb', line 76 def ascii?(name, = {}) open(name, 'rb') { |f| f.ascii?() } end |
#binary?(name, options = {}) ⇒ Boolean
Returns true if the file with name name
is considered to be binary using the FileBinary#binary? method.
70 71 72 |
# File 'lib/tins/file_binary.rb', line 70 def binary?(name, = {}) open(name, 'rb') { |f| f.binary?() } end |