Class: Ecogem::Gitsfile

Inherits:
Util::Config show all
Defined in:
lib/ecogem/gitsfile.rb,
lib/ecogem/gitsfile/entries.rb,
lib/ecogem/gitsfile/entries/keys.rb

Defined Under Namespace

Modules: Entries

Instance Method Summary collapse

Methods inherited from Util::Config

#dir, entries, entry, entry_namespace, entry_namespaces, find_entry_class, #initialize, #save, #values

Constructor Details

This class inherits a constructor from Ecogem::Util::Config

Instance Method Details

#dir_of(key) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/ecogem/gitsfile.rb', line 11

def dir_of(key)
  i = values.keys.find_index(key) || begin
    values.keys << key
    values.keys.size - 1
  end
  "#{dir}/#{i+1}"
end