Class: Textus::Manifest::Entry::Base
- Inherits:
-
Textus::Manifest::Entry
- Object
- Textus::Manifest::Entry
- Textus::Manifest::Entry::Base
- Defined in:
- lib/textus/manifest/entry/base.rb
Constant Summary
Constants inherited from Textus::Manifest::Entry
PUBLISH_EACH_VARS, PUBLISH_EACH_VAR_RE
Instance Attribute Summary collapse
-
#format ⇒ Object
readonly
Returns the value of attribute format.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#manifest ⇒ Object
readonly
Returns the value of attribute manifest.
-
#owner ⇒ Object
readonly
Returns the value of attribute owner.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
-
#schema ⇒ Object
readonly
Returns the value of attribute schema.
-
#zone ⇒ Object
readonly
Returns the value of attribute zone.
Instance Method Summary collapse
- #derived? ⇒ Boolean
- #in_generator_zone? ⇒ Boolean
- #in_proposal_zone? ⇒ Boolean
-
#initialize(manifest:, raw:, key:, path:, zone:, schema:, owner:, format:) ⇒ Base
constructor
rubocop:disable Metrics/ParameterLists, Lint/MissingSuper.
- #intake? ⇒ Boolean
-
#kind ⇒ Object
rubocop:enable Metrics/ParameterLists, Lint/MissingSuper.
- #leaf? ⇒ Boolean
- #nested? ⇒ Boolean
- #zone_writers ⇒ Object
Constructor Details
#initialize(manifest:, raw:, key:, path:, zone:, schema:, owner:, format:) ⇒ Base
rubocop:disable Metrics/ParameterLists, Lint/MissingSuper
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/textus/manifest/entry/base.rb', line 8 def initialize(manifest:, raw:, key:, path:, zone:, schema:, owner:, format:) @manifest = manifest @raw = raw @key = key @path = path @zone = zone @schema = schema @owner = owner @format = format end |
Instance Attribute Details
#format ⇒ Object (readonly)
Returns the value of attribute format.
5 6 7 |
# File 'lib/textus/manifest/entry/base.rb', line 5 def format @format end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
5 6 7 |
# File 'lib/textus/manifest/entry/base.rb', line 5 def key @key end |
#manifest ⇒ Object (readonly)
Returns the value of attribute manifest.
5 6 7 |
# File 'lib/textus/manifest/entry/base.rb', line 5 def manifest @manifest end |
#owner ⇒ Object (readonly)
Returns the value of attribute owner.
5 6 7 |
# File 'lib/textus/manifest/entry/base.rb', line 5 def owner @owner end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
5 6 7 |
# File 'lib/textus/manifest/entry/base.rb', line 5 def path @path end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
5 6 7 |
# File 'lib/textus/manifest/entry/base.rb', line 5 def raw @raw end |
#schema ⇒ Object (readonly)
Returns the value of attribute schema.
5 6 7 |
# File 'lib/textus/manifest/entry/base.rb', line 5 def schema @schema end |
#zone ⇒ Object (readonly)
Returns the value of attribute zone.
5 6 7 |
# File 'lib/textus/manifest/entry/base.rb', line 5 def zone @zone end |
Instance Method Details
#derived? ⇒ Boolean
32 |
# File 'lib/textus/manifest/entry/base.rb', line 32 def derived? = false |
#in_generator_zone? ⇒ Boolean
28 |
# File 'lib/textus/manifest/entry/base.rb', line 28 def in_generator_zone? = @manifest.zone_kinds(@zone).include?(:generator) |
#in_proposal_zone? ⇒ Boolean
29 |
# File 'lib/textus/manifest/entry/base.rb', line 29 def in_proposal_zone? = @manifest.zone_kinds(@zone).include?(:proposer) |
#intake? ⇒ Boolean
33 |
# File 'lib/textus/manifest/entry/base.rb', line 33 def intake? = false |
#kind ⇒ Object
rubocop:enable Metrics/ParameterLists, Lint/MissingSuper
20 |
# File 'lib/textus/manifest/entry/base.rb', line 20 def kind = self.class.name.split("::").last.downcase.to_sym |
#leaf? ⇒ Boolean
34 |
# File 'lib/textus/manifest/entry/base.rb', line 34 def leaf? = false |
#nested? ⇒ Boolean
31 |
# File 'lib/textus/manifest/entry/base.rb', line 31 def nested? = false |
#zone_writers ⇒ Object
22 23 24 25 26 |
# File 'lib/textus/manifest/entry/base.rb', line 22 def zone_writers @manifest.zone_writers(@zone) rescue UsageError => e raise UsageError.new("entry '#{@key}': #{e.}") end |