Class: Textus::Manifest::Entry::Produced
- Inherits:
-
Base
- Object
- Textus::Manifest::Entry
- Base
- Textus::Manifest::Entry::Produced
- Defined in:
- lib/textus/manifest/entry/produced.rb
Overview
A produced entry — ‘kind: produced` with an optional `source:` block. When `source:` is present it must be `from: external` (out-of-band generator; textus detects drift but never runs it). When absent the entry is produced by a workflow file in .textus/workflows/.
Constant Summary collapse
- KIND =
:produced
Constants inherited from Textus::Manifest::Entry
Instance Attribute Summary collapse
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Attributes inherited from Base
#format, #key, #lane, #owner, #path, #publish_targets, #raw, #schema
Class Method Summary collapse
Instance Method Summary collapse
- #external? ⇒ Boolean
-
#initialize(source:, **rest) ⇒ Produced
constructor
A new instance of Produced.
- #nested? ⇒ Boolean
-
#publish_via(pctx, prefix: nil) ⇒ Object
Publish existing store bytes via the shared publish mode (Publish::ToPaths or Publish::None).
Methods inherited from Base
#derived?, #events, #ignore, #ignored?, #in_proposal_lane?, #intake?, #lane_writers, #leaf?, #projection?, #publish_mode, #publish_to, #publish_tree, #tracked?
Constructor Details
#initialize(source:, **rest) ⇒ Produced
Returns a new instance of Produced.
11 12 13 14 |
# File 'lib/textus/manifest/entry/produced.rb', line 11 def initialize(source:, **rest) super(**rest) @source = source end |
Instance Attribute Details
#source ⇒ Object (readonly)
Returns the value of attribute source.
9 10 11 |
# File 'lib/textus/manifest/entry/produced.rb', line 9 def source @source end |
Class Method Details
.from_raw(common, raw) ⇒ Object
28 29 30 |
# File 'lib/textus/manifest/entry/produced.rb', line 28 def self.from_raw(common, raw) new(source: Parser.parse_source(raw, common[:key]), **common) end |
Instance Method Details
#external? ⇒ Boolean
16 |
# File 'lib/textus/manifest/entry/produced.rb', line 16 def external? = @source&.external? || false |
#nested? ⇒ Boolean
17 |
# File 'lib/textus/manifest/entry/produced.rb', line 17 def nested? = !!@raw["nested"] |
#publish_via(pctx, prefix: nil) ⇒ Object
Publish existing store bytes via the shared publish mode (Publish::ToPaths or Publish::None). Workflow runners handle the produce step; this method only publishes whatever bytes are already on disk.
24 25 26 |
# File 'lib/textus/manifest/entry/produced.rb', line 24 def publish_via(pctx, prefix: nil) publish_mode.publish(pctx, prefix: prefix) end |