Class: Ki::Repository::Repository

Inherits:
DirectoryBase show all
Defined in:
lib/data_storage/repository.rb

Overview

Repository root

  • Files: ki-components.json

See Also:

Instance Method Summary collapse

Methods inherited from DirectoryBase

#child, #empty?, #exists?, find!, #go, #init_from_path, #initialize, #ki_path, #mkdir, #name, #path, #root, #root?

Constructor Details

This class inherits a constructor from Ki::DirectoryBase

Instance Method Details

#version(str) ⇒ Object

finds version matching the last part of version string, for example: my/component/1 looks for version named 1

See Also:

  • Component#version


83
84
85
86
87
# File 'lib/data_storage/repository.rb', line 83

def version(str)
  args = str.split("/")
  args.delete_at(-1)
  component(args.join("/")).version(str)
end