Class: RBI::Index
- Extended by:
- T::Sig
- Includes:
- T::Enumerable
- Defined in:
- lib/rbi/index.rb
Class Method Summary collapse
Instance Method Summary collapse
- #[](id) ⇒ Object
- #index(*nodes) ⇒ Object
-
#initialize ⇒ Index
constructor
A new instance of Index.
- #keys ⇒ Object
- #visit(node) ⇒ Object
Methods inherited from Visitor
Constructor Details
Class Method Details
Instance Method Details
#[](id) ⇒ Object
32 33 34 |
# File 'lib/rbi/index.rb', line 32 def [](id) @index[id] ||= [] end |
#index(*nodes) ⇒ Object
37 38 39 |
# File 'lib/rbi/index.rb', line 37 def index(*nodes) nodes.each { |node| visit(node) } end |
#keys ⇒ Object
27 28 29 |
# File 'lib/rbi/index.rb', line 27 def keys @index.keys end |