Module: Nit::Files::CharIndexer

Defined in:
lib/nit/files.rb

Instance Method Summary collapse

Instance Method Details

#[](char) ⇒ Object



32
33
34
35
# File 'lib/nit/files.rb', line 32

def [](char)
  index = map.index(char)
  super(index)
end

#evaluate(chars) ⇒ Object



37
38
39
# File 'lib/nit/files.rb', line 37

def evaluate(chars)
  super(split(chars)) # "nit commit abc"
end

#index(file) ⇒ Object



41
42
43
# File 'lib/nit/files.rb', line 41

def index(file)
  map[super]
end

#list(indexes) ⇒ Object



45
46
47
# File 'lib/nit/files.rb', line 45

def list(indexes)
  super(split(indexes))
end