Module: Textus::Protocol::Manifest::Entry::Publish
- Defined in:
- lib/textus/protocol/manifest/entry/publish.rb
Defined Under Namespace
Classes: Mode, None, SubtreeMirror, ToPaths, Tree
Class Method Summary collapse
Class Method Details
.resolve(entry) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/textus/protocol/manifest/entry/publish.rb', line 8 def self.resolve(entry) set = [] set << "publish.to" unless Array(entry.publish_to).empty? set << "publish.tree" unless entry.publish_tree.nil? if set.length > 1 raise Textus::UsageError.new( "entry '#{entry.key}': #{set.join(" and ")} are mutually exclusive — an entry publishes exactly one way", ) end mode_for(entry, set.first) end |