Class: Ea::Spa::Output::Strategy
- Inherits:
-
Object
- Object
- Ea::Spa::Output::Strategy
- Defined in:
- lib/ea/spa/output/strategy.rb
Overview
Abstract output strategy. Concrete subclasses project the same SPA artifacts (skeleton, search index, shards) to disk in different layouts.
Adding a new layout = new subclass + registration in Generator::OUTPUT_STRATEGIES. No edit to Projector or existing strategies.
Direct Known Subclasses
Constant Summary collapse
- SIZE_THRESHOLD_BYTES =
2 MB
2 * 1024 * 1024
Instance Attribute Summary collapse
-
#output_path ⇒ Object
readonly
Returns the value of attribute output_path.
Instance Method Summary collapse
-
#initialize(output_path) ⇒ Strategy
constructor
A new instance of Strategy.
- #render(_projector) ⇒ Object
Constructor Details
#initialize(output_path) ⇒ Strategy
Returns a new instance of Strategy.
18 19 20 |
# File 'lib/ea/spa/output/strategy.rb', line 18 def initialize(output_path) @output_path = output_path end |
Instance Attribute Details
#output_path ⇒ Object (readonly)
Returns the value of attribute output_path.
16 17 18 |
# File 'lib/ea/spa/output/strategy.rb', line 16 def output_path @output_path end |
Instance Method Details
#render(_projector) ⇒ Object
22 23 24 25 |
# File 'lib/ea/spa/output/strategy.rb', line 22 def render(_projector) raise NotImplementedError, "#{self.class} must implement #render" end |