Class: Trout::VersionList
- Inherits:
-
Object
- Object
- Trout::VersionList
- Defined in:
- lib/trout/version_list.rb
Instance Attribute Summary collapse
-
#entries ⇒ Object
readonly
Returns the value of attribute entries.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #git_url_for(filename) ⇒ Object
-
#initialize(path) ⇒ VersionList
constructor
A new instance of VersionList.
- #update(filename, info) ⇒ Object
- #version_for(filename) ⇒ Object
Constructor Details
#initialize(path) ⇒ VersionList
Returns a new instance of VersionList.
7 8 9 |
# File 'lib/trout/version_list.rb', line 7 def initialize(path) @path = path end |
Instance Attribute Details
#entries ⇒ Object (readonly)
Returns the value of attribute entries.
5 6 7 |
# File 'lib/trout/version_list.rb', line 5 def entries @entries end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
5 6 7 |
# File 'lib/trout/version_list.rb', line 5 def path @path end |
Instance Method Details
#git_url_for(filename) ⇒ Object
11 12 13 14 |
# File 'lib/trout/version_list.rb', line 11 def git_url_for(filename) read entries[filename]['git_url'] end |
#update(filename, info) ⇒ Object
21 22 23 24 25 26 |
# File 'lib/trout/version_list.rb', line 21 def update(filename, info) read entries[filename] ||= {} entries[filename].update(info) write end |
#version_for(filename) ⇒ Object
16 17 18 19 |
# File 'lib/trout/version_list.rb', line 16 def version_for(filename) read entries[filename]['version'] end |