Class: Yome::Lib

Inherits:
Object
  • Object
show all
Defined in:
lib/yome/lib.rb

Class Method Summary collapse

Class Method Details

.binary?(path) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
10
# File 'lib/yome/lib.rb', line 7

def self.binary?(path)
  s = File.read(path, 1024) or return false
  return s.index("\x00")
end

.ignore?(path) ⇒ Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/yome/lib.rb', line 3

def self.ignore?(path)
  path == ".git" || path == "oboe.rb"
end