Class: Solargraph::Source::Chain::Link

Inherits:
Object
  • Object
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.



7
8
9
# File 'lib/solargraph/source/chain/link.rb', line 7

def initialize word = '<undefined>'
  @word = word
end

Instance Attribute Details

#wordObject (readonly)

Returns the value of attribute word.



5
6
7
# File 'lib/solargraph/source/chain/link.rb', line 5

def word
  @word
end

Instance Method Details

#==(other) ⇒ Object



27
28
29
# File 'lib/solargraph/source/chain/link.rb', line 27

def == other
  self.class == other.class and word == other.word
end

#constant?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/solargraph/source/chain/link.rb', line 15

def constant?
  is_a?(Chain::Constant)
end

#resolve(api_map, name_pin, locals) ⇒ Array<Pin::Base>

Parameters:

Returns:



23
24
25
# File 'lib/solargraph/source/chain/link.rb', line 23

def resolve api_map, name_pin, locals
  []
end

#undefined?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/solargraph/source/chain/link.rb', line 11

def undefined?
  word == '<undefined>'
end