Class: Solargraph::Source::Chain::Literal
- Inherits:
-
Link
- Object
- Link
- Solargraph::Source::Chain::Literal
show all
- Defined in:
- lib/solargraph/source/chain/literal.rb
Instance Method Summary
collapse
Methods inherited from Link
#==, #constant?, #undefined?
Constructor Details
#initialize(type) ⇒ Literal
Returns a new instance of Literal.
10
11
12
13
|
# File 'lib/solargraph/source/chain/literal.rb', line 10
def initialize type
@type = type
@complex_type = ComplexType.parse(type).first
end
|
Instance Method Details
#resolve(api_map, name_pin, locals) ⇒ Object
15
16
17
|
# File 'lib/solargraph/source/chain/literal.rb', line 15
def resolve api_map, name_pin, locals
[Pin::ProxyType.anonymous(@complex_type)]
end
|
#word ⇒ Object
5
6
7
|
# File 'lib/solargraph/source/chain/literal.rb', line 5
def word
@word ||= "<#{@type}>"
end
|