Class: Steep::Locator::TypeAssertionResult
- Includes:
- TypeNameLocator
- Defined in:
- lib/steep/locator.rb,
lib/steep/locator.rb
Instance Attribute Summary collapse
-
#assertion ⇒ Object
readonly
Returns the value of attribute assertion.
-
#node ⇒ Object
readonly
Returns the value of attribute node.
Instance Method Summary collapse
Methods included from TypeNameLocator
Instance Attribute Details
#assertion ⇒ Object (readonly)
Returns the value of attribute assertion
30 31 32 |
# File 'lib/steep/locator.rb', line 30 def assertion @assertion end |
#node ⇒ Object (readonly)
Returns the value of attribute node
30 31 32 |
# File 'lib/steep/locator.rb', line 30 def node @node end |
Instance Method Details
#locate_type_name(position, nesting, subtyping, type_vars) ⇒ Object
47 48 49 50 51 52 53 54 55 56 |
# File 'lib/steep/locator.rb', line 47 def locate_type_name(position, nesting, subtyping, type_vars) if type = assertion.rbs_type(nesting, subtyping, type_vars) 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 end |