Class: Solargraph::Bench

Inherits:
Object
  • Object
show all
Defined in:
lib/solargraph/bench.rb

Overview

A container of source maps and workspace data to be cataloged in an ApiMap.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source_maps: [], workspace: Workspace.new, external_requires: []) ⇒ Bench

Returns a new instance of Bench.

Parameters:

  • source_maps (Array<SourceMap>, Set<SourceMap>) (defaults to: [])
  • workspace (Workspace) (defaults to: Workspace.new)
  • external_requires (Array<String>, Set<String>) (defaults to: [])


21
22
23
24
25
# File 'lib/solargraph/bench.rb', line 21

def initialize source_maps: [], workspace: Workspace.new, external_requires: []
  @source_maps = source_maps.to_set
  @workspace = workspace
  @external_requires = external_requires.to_set
end

Instance Attribute Details

#external_requiresSet<String> (readonly)

Returns:

  • (Set<String>)


16
17
18
# File 'lib/solargraph/bench.rb', line 16

def external_requires
  @external_requires
end

#source_mapsSet<SourceMap> (readonly)

Returns:



10
11
12
# File 'lib/solargraph/bench.rb', line 10

def source_maps
  @source_maps
end

#workspaceWorkspace (readonly)

Returns:



13
14
15
# File 'lib/solargraph/bench.rb', line 13

def workspace
  @workspace
end