Module: Solargraph::Pin::Common
- Included in:
- Base
- Defined in:
- lib/solargraph/pin/common.rb
Instance Attribute Summary collapse
- #closure ⇒ Pin::Base? readonly
- #location ⇒ Location readonly
Instance Method Summary collapse
- #binder ⇒ ComplexType
- #comments ⇒ String
- #context ⇒ ComplexType (also: #full_context)
- #name ⇒ String
- #namespace ⇒ String
- #path ⇒ String
- #return_type ⇒ ComplexType
Instance Attribute Details
#closure ⇒ Pin::Base? (readonly)
10 11 12 |
# File 'lib/solargraph/pin/common.rb', line 10 def closure @closure end |
#location ⇒ Location (readonly)
7 8 9 |
# File 'lib/solargraph/pin/common.rb', line 7 def location @location end |
Instance Method Details
#binder ⇒ ComplexType
35 36 37 |
# File 'lib/solargraph/pin/common.rb', line 35 def binder @binder || context end |
#comments ⇒ String
40 41 42 |
# File 'lib/solargraph/pin/common.rb', line 40 def comments @comments ||= '' end |
#context ⇒ ComplexType Also known as: full_context
23 24 25 26 |
# File 'lib/solargraph/pin/common.rb', line 23 def context # Get the static context from the nearest namespace @context ||= find_context end |
#name ⇒ String
13 14 15 |
# File 'lib/solargraph/pin/common.rb', line 13 def name @name ||= '' end |
#namespace ⇒ String
30 31 32 |
# File 'lib/solargraph/pin/common.rb', line 30 def namespace context.namespace.to_s end |
#path ⇒ String
45 46 47 |
# File 'lib/solargraph/pin/common.rb', line 45 def path @path ||= name.empty? ? context.namespace : "#{context.namespace}::#{name}" end |
#return_type ⇒ ComplexType
18 19 20 |
# File 'lib/solargraph/pin/common.rb', line 18 def return_type @return_type ||= ComplexType::UNDEFINED end |