Class: Ryac::Pipeline::MinifiedResult
- Inherits:
-
Data
- Object
- Data
- Ryac::Pipeline::MinifiedResult
- Defined in:
- lib/ryac/pipeline/data_types.rb,
sig/ryac/pipeline/data_types.rbs
Overview
Final output of the pipeline.
content is the assembled runnable program: stdlib requires, then the preamble, then the minified code. preamble is a slice of content carried separately so callers that split output can identify it — never something to append to content again. aliases are the one part kept out: optional compatibility shims, attached by full_content or written to their own file.
Instance Attribute Summary collapse
-
#aliases ⇒ Object
readonly
Returns the value of attribute aliases.
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#preamble ⇒ Object
readonly
Returns the value of attribute preamble.
-
#stats ⇒ Object
readonly
Returns the value of attribute stats.
Class Method Summary collapse
Instance Method Summary collapse
-
#full_content ⇒ String
The program with its alias shims attached — what a caller runs when not splitting the aliases into a separate file.
-
#initialize(content:, aliases: '', preamble: '', stats:) ⇒ MinifiedResult
constructor
steep:ignore UndeclaredMethodDefinition.
Constructor Details
#initialize(content:, aliases: '', preamble: '', stats:) ⇒ MinifiedResult
steep:ignore UndeclaredMethodDefinition
176 177 178 |
# File 'lib/ryac/pipeline/data_types.rb', line 176 def initialize(content:, aliases: '', preamble: '', stats:) # steep:ignore UndeclaredMethodDefinition super end |
Instance Attribute Details
#aliases ⇒ Object (readonly)
Returns the value of attribute aliases
170 171 172 |
# File 'lib/ryac/pipeline/data_types.rb', line 170 def aliases @aliases end |
#content ⇒ Object (readonly)
Returns the value of attribute content
170 171 172 |
# File 'lib/ryac/pipeline/data_types.rb', line 170 def content @content end |
#preamble ⇒ Object (readonly)
Returns the value of attribute preamble
170 171 172 |
# File 'lib/ryac/pipeline/data_types.rb', line 170 def preamble @preamble end |
#stats ⇒ Object (readonly)
Returns the value of attribute stats
170 171 172 |
# File 'lib/ryac/pipeline/data_types.rb', line 170 def stats @stats end |
Class Method Details
.new ⇒ MinifiedResult
149 |
# File 'sig/ryac/pipeline/data_types.rbs', line 149
def self.new: (content: String, ?aliases: String, ?preamble: String, stats: CompressionStats) -> MinifiedResult
|
Instance Method Details
#full_content ⇒ String
The program with its alias shims attached — what a caller runs when not splitting the aliases into a separate file.
182 183 184 |
# File 'lib/ryac/pipeline/data_types.rb', line 182 def full_content # steep:ignore UndeclaredMethodDefinition aliases.empty? ? content : "#{content};#{aliases}" # steep:ignore NoMethod end |