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
28 29 30 |
# File 'lib/rbi/index.rb', line 28 def [](id) @index[id] ||= [] end |
#index(*nodes) ⇒ Object
33 34 35 |
# File 'lib/rbi/index.rb', line 33 def index(*nodes) nodes.each { |node| visit(node) } end |
#keys ⇒ Object
23 24 25 |
# File 'lib/rbi/index.rb', line 23 def keys @index.keys end |