Class: Textus::Format::Base
- Inherits:
-
Object
- Object
- Textus::Format::Base
show all
- Defined in:
- lib/textus/format/base.rb
Class Method Summary
collapse
-
.enforce_name_match!(_path, _meta) ⇒ Object
-
.extensions ⇒ Object
-
.inject_uid(_meta, _content, _existing_uid) ⇒ Object
-
.nested_glob ⇒ Object
-
.parse(_raw, path: nil) ⇒ Object
-
.rewrite_name(_path, _basename) ⇒ Object
-
.serialize(meta: {}, body: "", content: nil) ⇒ Object
-
.serialize_for_put(meta:, body:, content:, path:) ⇒ Object
-
.validate_against(schema, parsed) ⇒ Object
-
.validate_path_extension(_path, _nested) ⇒ Object
Class Method Details
.enforce_name_match!(_path, _meta) ⇒ Object
36
37
38
|
# File 'lib/textus/format/base.rb', line 36
def self.enforce_name_match!(_path, _meta)
raise NotImplementedError.new("#{name}.enforce_name_match! not implemented")
end
|
.extensions ⇒ Object
16
17
18
|
# File 'lib/textus/format/base.rb', line 16
def self.extensions
raise NotImplementedError.new("#{name}.extensions not implemented")
end
|
.inject_uid(_meta, _content, _existing_uid) ⇒ Object
32
33
34
|
# File 'lib/textus/format/base.rb', line 32
def self.inject_uid(_meta, _content, _existing_uid)
raise NotImplementedError.new("#{name}.inject_uid not implemented")
end
|
.nested_glob ⇒ Object
24
25
26
|
# File 'lib/textus/format/base.rb', line 24
def self.nested_glob
raise NotImplementedError.new("#{name}.nested_glob not implemented")
end
|
.parse(_raw, path: nil) ⇒ Object
4
5
6
7
|
# File 'lib/textus/format/base.rb', line 4
def self.parse(_raw, path: nil)
_ = path
raise NotImplementedError.new("#{name}.parse not implemented")
end
|
.rewrite_name(_path, _basename) ⇒ Object
48
49
50
|
# File 'lib/textus/format/base.rb', line 48
def self.rewrite_name(_path, _basename)
raise NotImplementedError.new("#{name}.rewrite_name not implemented")
end
|
.serialize(meta: {}, body: "", content: nil) ⇒ Object
9
10
11
12
13
14
|
# File 'lib/textus/format/base.rb', line 9
def self.serialize(meta: {}, body: "", content: nil)
_ = meta
_ = body
_ = content
raise NotImplementedError.new("#{name}.serialize not implemented")
end
|
.serialize_for_put(meta:, body:, content:, path:) ⇒ Object
40
41
42
43
44
45
46
|
# File 'lib/textus/format/base.rb', line 40
def self.serialize_for_put(meta:, body:, content:, path:)
_ = meta
_ = body
_ = content
_ = path
raise NotImplementedError.new("#{name}.serialize_for_put not implemented")
end
|
.validate_against(schema, parsed) ⇒ Object
20
21
22
|
# File 'lib/textus/format/base.rb', line 20
def self.validate_against(schema, parsed)
schema.validate!(parsed["_meta"] || {})
end
|
.validate_path_extension(_path, _nested) ⇒ Object
28
29
30
|
# File 'lib/textus/format/base.rb', line 28
def self.validate_path_extension(_path, _nested)
raise NotImplementedError.new("#{name}.validate_path_extension not implemented")
end
|