Class: Solargraph::Source::Chain::Hash

Inherits:
Literal show all
Defined in:
lib/solargraph/source/chain/hash.rb

Instance Attribute Summary

Attributes inherited from Link

#last_context

Instance Method Summary collapse

Methods inherited from Link

#clone_body, #clone_head, #constant?, #desc, #head?, #inspect, #nullable?, #to_s, #undefined?

Methods included from Equality

#==, #eql?, #freeze, #hash

Constructor Details

#initialize(type, splatted = false) ⇒ Hash

Returns a new instance of Hash.

Parameters:

  • type (String)
  • splatted (Boolean) (defaults to: false)


9
10
11
12
# File 'lib/solargraph/source/chain/hash.rb', line 9

def initialize type, splatted = false
  super(type)
  @splatted = splatted
end

Instance Method Details

#resolve(api_map, name_pin, locals) ⇒ Object



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

def resolve api_map, name_pin, locals
  [Pin::ProxyType.anonymous(@complex_type)]
end

#splatted?Boolean

Returns:

  • (Boolean)


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

def splatted?
  @splatted
end

#wordObject



19
20
21
# File 'lib/solargraph/source/chain/hash.rb', line 19

def word
  @word ||= "<#{@type}>"
end