Module: Nit::Files::PublicMethods

Included in:
Nit::Files
Defined in:
lib/nit/files.rb

Overview

we could also use a dedicated object here.

Instance Method Summary collapse

Instance Method Details

#[](index) ⇒ Object



10
11
12
# File 'lib/nit/files.rb', line 10

def [](index)
  super(index.to_i)
end

#evaluate(indexes) ⇒ Object

Return list of file names for indexes.



15
16
17
# File 'lib/nit/files.rb', line 15

def evaluate(indexes)
  indexes.collect { |i| self[i] }
end

#list(indexes) ⇒ Object

decorator:



20
21
22
# File 'lib/nit/files.rb', line 20

def list(indexes)
  indexes.collect { |i| self[i] }.join(" ")
end