Module: Solargraph::Pin::Common
- Included in:
- Base, Conversions
- Defined in:
- lib/solargraph/pin/common.rb
Instance Attribute Summary collapse
- #context ⇒ ComplexType, ComplexType::UniqueType (also: #full_context) readonly
- #location ⇒ Location?
Instance Method Summary collapse
-
#binder ⇒ ComplexType, ComplexType::UniqueType
@sg-ignore github.com/castwide/solargraph/pull/1100.
- #closure ⇒ Pin::Closure?
- #closure=(value) ⇒ void
- #comments ⇒ String
- #name ⇒ String
- #namespace ⇒ String
- #path ⇒ String
- #reset_generated! ⇒ void abstract
- #return_type ⇒ ComplexType
- #source ⇒ Source? abstract
Instance Attribute Details
#context ⇒ ComplexType, ComplexType::UniqueType Also known as: full_context
48 49 50 51 |
# File 'lib/solargraph/pin/common.rb', line 48 def context # Get the static context from the nearest namespace @context ||= find_context end |
#location ⇒ Location?
TODO:
Missed nil violation
17 18 19 |
# File 'lib/solargraph/pin/common.rb', line 17 def location @location end |
Instance Method Details
#binder ⇒ ComplexType, ComplexType::UniqueType
@sg-ignore github.com/castwide/solargraph/pull/1100
61 62 63 |
# File 'lib/solargraph/pin/common.rb', line 61 def binder @binder || context end |
#closure ⇒ Pin::Closure?
28 29 30 31 32 33 34 |
# File 'lib/solargraph/pin/common.rb', line 28 def closure unless @closure Solargraph.assert_or_log(:closure, "Closure not set on #{self.class} #{name.inspect} from #{source.inspect}") end @closure end |
#closure=(value) ⇒ void
This method returns an undefined value.
21 22 23 24 25 |
# File 'lib/solargraph/pin/common.rb', line 21 def closure= value @closure = value # remove cached values generated from closure reset_generated! end |
#comments ⇒ String
66 67 68 |
# File 'lib/solargraph/pin/common.rb', line 66 def comments @comments ||= '' end |
#name ⇒ String
37 38 39 |
# File 'lib/solargraph/pin/common.rb', line 37 def name @name ||= '' end |
#namespace ⇒ String
55 56 57 |
# File 'lib/solargraph/pin/common.rb', line 55 def namespace context.namespace.to_s end |
#path ⇒ String
71 72 73 |
# File 'lib/solargraph/pin/common.rb', line 71 def path @path ||= name.empty? ? context.namespace : "#{context.namespace}::#{name}" end |
#reset_generated! ⇒ void
This method is abstract.
This method returns an undefined value.
|
|
# File 'lib/solargraph/pin/common.rb', line 6
|
#return_type ⇒ ComplexType
TODO:
redundant with Base#return_type?
43 44 45 |
# File 'lib/solargraph/pin/common.rb', line 43 def return_type @return_type ||= ComplexType::UNDEFINED end |