Class: Solargraph::Source::Chain::Link
- Inherits:
-
Object
- Object
- Solargraph::Source::Chain::Link
show all
- Defined in:
- lib/solargraph/source/chain/link.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(word = '<undefined>') ⇒ Link
Returns a new instance of Link.
12
13
14
|
# File 'lib/solargraph/source/chain/link.rb', line 12
def initialize word = '<undefined>'
@word = word
end
|
Instance Attribute Details
#last_context ⇒ Object
Returns the value of attribute last_context.
10
11
12
|
# File 'lib/solargraph/source/chain/link.rb', line 10
def last_context
@last_context
end
|
#word ⇒ String
8
9
10
|
# File 'lib/solargraph/source/chain/link.rb', line 8
def word
@word
end
|
Instance Method Details
#==(other) ⇒ Object
36
37
38
|
# File 'lib/solargraph/source/chain/link.rb', line 36
def == other
self.class == other.class and word == other.word
end
|
#clone_body ⇒ self
Make a copy of this link unmarked as the head of a chain
50
51
52
|
# File 'lib/solargraph/source/chain/link.rb', line 50
def clone_body
clone.mark_head(false)
end
|
#clone_head ⇒ self
Make a copy of this link marked as the head of a chain
43
44
45
|
# File 'lib/solargraph/source/chain/link.rb', line 43
def clone_head
clone.mark_head(true)
end
|
#constant? ⇒ Boolean
20
21
22
|
# File 'lib/solargraph/source/chain/link.rb', line 20
def constant?
is_a?(Chain::Constant)
end
|
#head? ⇒ Boolean
32
33
34
|
# File 'lib/solargraph/source/chain/link.rb', line 32
def head?
@head ||= false
end
|
#nullable? ⇒ Boolean
54
55
56
|
# File 'lib/solargraph/source/chain/link.rb', line 54
def nullable?
false
end
|
#resolve(api_map, name_pin, locals) ⇒ Array<Pin::Base>
28
29
30
|
# File 'lib/solargraph/source/chain/link.rb', line 28
def resolve api_map, name_pin, locals
[]
end
|
#undefined? ⇒ Boolean
16
17
18
|
# File 'lib/solargraph/source/chain/link.rb', line 16
def undefined?
word == '<undefined>'
end
|