Class: Solargraph::Pin::Constant
- Inherits:
-
BaseVariable
- Object
- Base
- BaseVariable
- Solargraph::Pin::Constant
- Defined in:
- lib/solargraph/pin/constant.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from BaseVariable
Methods included from NodeMethods
#const_from, #infer_literal_node_type, #pack_name, #resolve_node_signature, #unpack_name
Methods inherited from Base
#docstring, #filename, #initialize, #location, #parameters, #path, #return_type, #signature
Constructor Details
This class inherits a constructor from Solargraph::Pin::Base
Instance Method Details
#kind ⇒ Object
9 10 11 |
# File 'lib/solargraph/pin/constant.rb', line 9 def kind Solargraph::Suggestion::CONSTANT end |
#name ⇒ Object
5 6 7 |
# File 'lib/solargraph/pin/constant.rb', line 5 def name @name ||= node.children[1].to_s end |
#value ⇒ Object
13 14 15 |
# File 'lib/solargraph/pin/constant.rb', line 13 def value source.code_for(node.children[2]) end |