Class: Steep::Locator::TypeApplicationResult
- Includes:
- TypeNameLocator
- Defined in:
- lib/steep/locator.rb,
lib/steep/locator.rb
Instance Attribute Summary collapse
-
#application ⇒ Object
readonly
Returns the value of attribute application.
-
#node ⇒ Object
readonly
Returns the value of attribute node.
Instance Method Summary collapse
Methods included from TypeNameLocator
Instance Attribute Details
#application ⇒ Object (readonly)
Returns the value of attribute application
32 33 34 |
# File 'lib/steep/locator.rb', line 32 def application @application end |
#node ⇒ Object (readonly)
Returns the value of attribute node
32 33 34 |
# File 'lib/steep/locator.rb', line 32 def node @node end |
Instance Method Details
#locate_type_name(position, nesting, subtyping, type_vars) ⇒ Object
62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/steep/locator.rb', line 62 def locate_type_name(position, nesting, subtyping, type_vars) application.each_rbs_type(nesting, subtyping, type_vars) do |type| location = type.location or raise if location.start_pos <= position && position <= location.end_pos if loc = type_name_at(position, type) return loc end end end nil end |