Class: Tapioca::RepoIndex
- Inherits:
-
Object
- Object
- Tapioca::RepoIndex
- Extended by:
- T::Sig
- Defined in:
- lib/tapioca/repo_index.rb
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
: (Hash[String, Hash[untyped, untyped]] hash) -> RepoIndex.
-
.from_json(json) ⇒ Object
: (String json) -> RepoIndex.
Instance Method Summary collapse
-
#<<(gem_name) ⇒ Object
: (String gem_name) -> void.
-
#gems ⇒ Object
: -> T::Enumerable.
-
#has_gem?(gem_name) ⇒ Boolean
: (String gem_name) -> bool.
-
#initialize ⇒ RepoIndex
constructor
: -> void.
Constructor Details
#initialize ⇒ RepoIndex
: -> void
24 25 26 |
# File 'lib/tapioca/repo_index.rb', line 24 def initialize @entries = Set.new #: Set[String] end |
Class Method Details
Instance Method Details
#<<(gem_name) ⇒ Object
: (String gem_name) -> void
29 30 31 |
# File 'lib/tapioca/repo_index.rb', line 29 def <<(gem_name) @entries.add(gem_name) end |
#gems ⇒ Object
: -> T::Enumerable
34 35 36 |
# File 'lib/tapioca/repo_index.rb', line 34 def gems @entries.sort end |
#has_gem?(gem_name) ⇒ Boolean
: (String gem_name) -> bool
39 40 41 |
# File 'lib/tapioca/repo_index.rb', line 39 def has_gem?(gem_name) @entries.include?(gem_name) end |