Class: String
- Inherits:
-
Object
- Object
- String
- Includes:
- Diffable, Redmine::CoreExtensions::String::Conversions, Redmine::CoreExtensions::String::Inflections
- Defined in:
- lib/redmine/core_ext/string.rb,
lib/diff.rb
Overview
:nodoc:
Direct Known Subclasses
Instance Method Summary collapse
Methods included from Redmine::CoreExtensions::String::Inflections
Methods included from Redmine::CoreExtensions::String::Conversions
Methods included from Diffable
#diff, #patch, #replacenextlarger, #reverse_hash
Instance Method Details
#is_binary_data? ⇒ Boolean
8 9 10 |
# File 'lib/redmine/core_ext/string.rb', line 8 def is_binary_data? ( self.count( "^ -~", "^\r\n" ).fdiv(self.size) > 0.3 || self.index( "\x00" ) ) unless empty? end |