Class: Solargraph::Bundle
- Inherits:
-
Object
- Object
- Solargraph::Bundle
- Defined in:
- lib/solargraph/bundle.rb
Overview
An aggregation of a workspace and additional sources to be cataloged in an ApiMap.
Instance Attribute Summary collapse
- #opened ⇒ Array<Source> readonly
- #workspace ⇒ Workspace readonly
Instance Method Summary collapse
-
#initialize(workspace: Workspace.new, opened: []) ⇒ Bundle
constructor
A new instance of Bundle.
- #sources ⇒ Array<Source>
Constructor Details
Instance Attribute Details
#opened ⇒ Array<Source> (readonly)
12 13 14 |
# File 'lib/solargraph/bundle.rb', line 12 def opened @opened end |
#workspace ⇒ Workspace (readonly)
9 10 11 |
# File 'lib/solargraph/bundle.rb', line 9 def workspace @workspace end |
Instance Method Details
#sources ⇒ Array<Source>
22 23 24 |
# File 'lib/solargraph/bundle.rb', line 22 def sources @sources ||= (opened + workspace.sources).uniq(&:filename) end |