Class: Textus::Manifest::Policy::Source
- Inherits:
-
Object
- Object
- Textus::Manifest::Policy::Source
- Defined in:
- lib/textus/manifest/policy/source.rb
Overview
An entry’s external-generator declaration. ‘source:` now means ONLY `from: external` — out-of-band runner; textus never invokes it, only detects drift (doctor generator_drift check). `from: fetch` and `from: derive` are removed; those concerns now live in workflow files under .textus/workflows/.
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#sources ⇒ Object
readonly
Returns the value of attribute sources.
Instance Method Summary collapse
- #external? ⇒ Boolean
-
#initialize(raw) ⇒ Source
constructor
A new instance of Source.
- #kind ⇒ Object
Constructor Details
#initialize(raw) ⇒ Source
Returns a new instance of Source.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/textus/manifest/policy/source.rb', line 12 def initialize(raw) from = raw["from"].to_s unless from == "external" raise Textus::BadManifest.new( "from: #{from} is removed — use a workflow file under .textus/workflows/ instead", ) end @command = raw["command"] or raise Textus::BadManifest.new("source (from: external) requires a `command:` field") @sources = raw["sources"] || [] end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
10 11 12 |
# File 'lib/textus/manifest/policy/source.rb', line 10 def command @command end |
#sources ⇒ Object (readonly)
Returns the value of attribute sources.
10 11 12 |
# File 'lib/textus/manifest/policy/source.rb', line 10 def sources @sources end |
Instance Method Details
#external? ⇒ Boolean
25 |
# File 'lib/textus/manifest/policy/source.rb', line 25 def external? = true |
#kind ⇒ Object
26 |
# File 'lib/textus/manifest/policy/source.rb', line 26 def kind = :external |