Module: Solargraph::Pin::Localized
- Included in:
- BlockParameter, LocalVariable
- Defined in:
- lib/solargraph/pin/localized.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
- #presence ⇒ Range readonly
Instance Method Summary collapse
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
4 5 6 |
# File 'lib/solargraph/pin/localized.rb', line 4 def block @block end |
#presence ⇒ Range (readonly)
7 8 9 |
# File 'lib/solargraph/pin/localized.rb', line 7 def presence @presence end |
Instance Method Details
#visible_from?(other, position) ⇒ Boolean
12 13 14 15 16 17 18 |
# File 'lib/solargraph/pin/localized.rb', line 12 def visible_from?(other, position) other.filename == filename and ( other == block or (block.location.range.contain?(other.location.range.start) and block.location.range.contain?(other.location.range.ending)) ) and presence.contain?(position) end |