Class: Textus::Manifest

Inherits:
Data
  • Object
show all
Defined in:
lib/textus/manifest.rb,
lib/textus/manifest.rb,
lib/textus/manifest/data.rb,
lib/textus/manifest/entry.rb,
lib/textus/manifest/rules.rb,
lib/textus/manifest/policy.rb,
lib/textus/manifest/schema.rb,
lib/textus/manifest/resolver.rb,
lib/textus/manifest/entry/base.rb,
lib/textus/manifest/entry/leaf.rb,
lib/textus/manifest/role_kinds.rb,
lib/textus/manifest/entry/intake.rb,
lib/textus/manifest/entry/nested.rb,
lib/textus/manifest/entry/parser.rb,
lib/textus/manifest/entry/derived.rb,
lib/textus/manifest/entry/validators.rb,
lib/textus/manifest/entry/validators/events.rb,
lib/textus/manifest/entry/validators/inject_boot.rb,
lib/textus/manifest/entry/validators/publish_each.rb,
lib/textus/manifest/entry/validators/format_matrix.rb,
lib/textus/manifest/entry/validators/index_filename.rb

Overview

rubocop:disable Style/OneClassPerFile

Defined Under Namespace

Modules: RoleKinds, Schema Classes: Data, Entry, Policy, Resolver, Rules

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data

Returns:

  • (Object)

    the current value of data



13
14
15
# File 'lib/textus/manifest.rb', line 13

def data
  @data
end

#policyObject (readonly)

Returns the value of attribute policy

Returns:

  • (Object)

    the current value of policy



13
14
15
# File 'lib/textus/manifest.rb', line 13

def policy
  @policy
end

#resolverObject (readonly)

Returns the value of attribute resolver

Returns:

  • (Object)

    the current value of resolver



13
14
15
# File 'lib/textus/manifest.rb', line 13

def resolver
  @resolver
end

#rulesObject (readonly)

Returns the value of attribute rules

Returns:

  • (Object)

    the current value of rules



13
14
15
# File 'lib/textus/manifest.rb', line 13

def rules
  @rules
end

Class Method Details

.load(root) ⇒ Object

Raises:



33
34
35
36
37
38
39
40
# File 'lib/textus/manifest.rb', line 33

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: false)
  check_version!(raw, manifest_path)
  build(raw, root)
end

.parse(yaml_text, root: ".") ⇒ Object



27
28
29
30
31
# File 'lib/textus/manifest.rb', line 27

def parse(yaml_text, root: ".")
  raw = YAML.safe_load(yaml_text, aliases: false)
  check_version!(raw, "<string>")
  build(raw, root)
end