Class: Textus::Protocol::Manifest
- Inherits:
-
Data
- Object
- Data
- Textus::Protocol::Manifest
- Defined in:
- lib/textus/protocol/manifest.rb,
lib/textus/protocol/manifest.rb,
lib/textus/protocol/manifest/data.rb,
lib/textus/protocol/manifest/entry.rb,
lib/textus/protocol/manifest/policy.rb,
lib/textus/protocol/manifest/schema.rb,
lib/textus/protocol/manifest/resolver.rb,
lib/textus/protocol/manifest/entry/base.rb,
lib/textus/protocol/manifest/entry/leaf.rb,
lib/textus/protocol/manifest/entry/nested.rb,
lib/textus/protocol/manifest/entry/parser.rb,
lib/textus/protocol/manifest/entry/publish.rb,
lib/textus/protocol/manifest/schema/contract.rb,
lib/textus/protocol/manifest/schema/validator.rb,
lib/textus/protocol/manifest/policy/publish_target.rb
Defined Under Namespace
Modules: Schema Classes: Data, Entry, Policy, Resolver
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#policy ⇒ Object
readonly
Returns the value of attribute policy.
-
#resolver ⇒ Object
readonly
Returns the value of attribute resolver.
Class Method Summary collapse
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data
5 6 7 |
# File 'lib/textus/protocol/manifest.rb', line 5 def data @data end |
#policy ⇒ Object (readonly)
Returns the value of attribute policy
5 6 7 |
# File 'lib/textus/protocol/manifest.rb', line 5 def policy @policy end |
#resolver ⇒ Object (readonly)
Returns the value of attribute resolver
5 6 7 |
# File 'lib/textus/protocol/manifest.rb', line 5 def resolver @resolver end |
Class Method Details
.load(root) ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'lib/textus/protocol/manifest.rb', line 24 def load(root) manifest_path = File.join(root, "manifest.yaml") raise IoError.new("manifest not found: #{manifest_path}") unless File.exist?(manifest_path) raw = YAML.safe_load_file(manifest_path, aliases: true) check_version!(raw, manifest_path) build(raw, root) end |
.parse(yaml_text, root: ".") ⇒ Object
18 19 20 21 22 |
# File 'lib/textus/protocol/manifest.rb', line 18 def parse(yaml_text, root: ".") raw = YAML.safe_load(yaml_text, aliases: true) check_version!(raw, "<string>") build(raw, root) end |